Unit testing with Data Access Layer

Posted by chobo on Stack Overflow See other posts from Stack Overflow or by chobo
Published on 2010-05-05T18:32:34Z Indexed on 2010/05/05 20:58 UTC
Read the original article Hit count: 150

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about linq-to-sql