Unit testing with Data Access Layer
- by chobo
Hi, what is a good way to write unit tests with a LINQ to SQL DAL?
Currently I am doing some database testing and need to create helper methods that access the database, but I don't want those methods in my main repo's.
So what I have is two copies of the DAL, one in my main project and one in the Test project. Is it easier to manage these things if I create a separate project for the data layer? I'm not sure which way is a better way to approach this.
If I do create a data layer project would I move all my repo's to that project as well? I'm not sure how to properly setup the layers.
Thanks