InvalidOperationException - EF Instance - Identity Resolution
I'm getting:
After restarting the application everything seems to be correctly updated despite the error. I've read a couple of stackoverflow posts, but I couldn't figure out what to do in order to fix this.
Would appreciate any help.
2 Replies
Changing it to:
Seems to fix the issue and it still appears to fully work, will do some more testing but still appreciate any advice.
Thanks in advance!
The repository pattern isnt doing you any favors here, ef already implements the repository pattern, making your abstraction unnecessary additional complexity. Ef already handles update detection so you dont need to
Asp.net core api controllers ensure the model state is valid, its not a check you need to perform any longer
Consider making the converthelper methods extension methods, this lets you write code like model.ToRoom(true);