24 Replies
I dont get it, what am I supposed to do. I did a good amount of research but found no work arounds or solutions. Im guessing the method (.Include(x > x.Locations)) is not supported because its from EF Core? I don't see why thats a problem though I have that package referenced in my test project. I can't just delete my include statements from my controllers, they are very important
Are you running on .net framework or something?
Yeah net7.0
So no
??
Net7 isn't framework
Then why does it say this <TargetFramework>net7.0</TargetFramework>
'framework' is 4.8 and under
Okay
After that it's "dotnet core" or "dotnet"
Knowing its net7.0, do you have a solution?
Sorry, I don't know what's up unless you're using a mis match of libs, but not sure how that would be possible
What is the package reference you have?
Err, well you're mixing EF and EF Core, it looks like
I can fix that, I just added that, it isn't the source of the problem
dont mock ef, its one of the stupidest wastes of time
What do I do about Unit testing my controller then?
Or should I just unit test the Client of the controller?
either use the inmemory context, or integration test this
I did use inmemorycontext I thought?
you created the options, but then you use a mock for the dbcontext making that pointless
So what would need changed to use an inmemorycontext
remove anything related to mocking
Well Ill be damned, its working
Its goofy, Ill refactor later
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.