Closed stephajn closed 2 years ago
+1 for this. With .Include(x => x.SomeProperty) eager loading, it seems the mock is not working correctly. (Entities are not loaded to the parent entity and the property returns empty HashSet.)
I'm curious that no one has discussed about the problem up until today. Does this problem only happen in recent EF Core version?
I'm using Microsoft.EntityFrameworkCore 6.0.3 with .Net 6.0.
This library does not support that at this moment. If you can add a test-case and implementation in a PR, I'd happily review and accept it.
We are using this library to mock a DbSet, but on our DbSet, we are making use of .Include(x => x.SomeProperty) and .ThenInclude(x => x.SomeChildPropertyOfSomeProperty)
Some of our tests are failing and I just want to confirm that it isn't because this library isn't able to support code that does that.
Cheers!