Woulda, coulda, shoulda! Login and vote now.
By bloid
via andrewtokeley.net
Published: Jul 08 2008 / 03:05
In Linq to Sql we always work with a DataContext object (which doesn’t implement any interface) which exposes the database tables as Table> (which do not implement an interface either). This means it’s not possible to mock either the DataContext or the data tables without using expensive mocking software (for example, Typemock.net). So it isn’t really possible to unit test your Linq to SLQ queries without being connected to the underlying data source – not ideal. But fear not, here is a generic solution to this problem.
SaveShareSend
Tags: .net, frameworks
Add your comment