dotnet / ef6

This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore.

Home Page:https://docs.microsoft.com/ef/ef6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to add entities without setting state of reachable entities to added

hamishjam opened this issue · comments

When working with short use dbContexts I've found it quite challenging to detach all child objects that may already exist within the db. An additional parameter on Add / AddAsync to set state for reachable objects would save significant overhead in tidying up the sub-entities after the parent has been attached to the context. Current workarounds are leaving the child entities as null and only specifying Ids. Apologies if this is already achievable.

This issue has been closed because EF6 is no longer being actively developed. We are instead focusing on stability of the codebase, which means we will only make changes to address security issues. See the repo README for more information.