I’ve been searching a bit on this but thus far haven’t been able to find a decent solution. I’m trying to get an entity from my database without the related entities attached to it.
The function goes as following
return context.Entity.SingleOrDefault(n => n.Name == name) where
context is a DbContext.
As of now the reply contains only one Entity but with an added 50 “child” entities which I do not need.
What would be the best way to go about getting a single entity from the db?