How are people unit testing code that uses Linq to SQL?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Update:
Fredrik has put an example solution on how to do unit test linq2sql applications over at his blog. You can download it at:
http://web.archive.org/web/20120415022448/http://iridescence.no/post/DataContext-Repository-Pattern-Example-Code.aspx
Not only do I think its great that he posted an example solution, he also managed to extract interfaces for all classes, which makes the design more decoupled.
My old post:
*I found these blogs that I think are a good start for making the DataContext wrapper: Link1 Link2
They cover almost the same topic except that the first one implements means for extracting interfaces for the tables as well. The second one is more extensive though, so I included it as well.*