Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: Mocking DbSet throws ArgumentNullException for 'source' argument when used with Include

$
0
0
While I can't offer insight into your problem, I just wanted to chime in: These sorts of issues are why I like to use a layer on top of EF. I will usually implement a generic repository pattern.

This way, your mocks are of IRepository<T> as opposed to trying to mock up the DbSet<T>. I have successfully mocked .Include() by just populating navigation properties with fake data in the initial mock arrangement using Telerik JustMock.

Viewing all articles
Browse latest Browse all 1793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>