Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added NoTracking support #211

Merged
merged 4 commits into from
Dec 18, 2020
Merged

Added NoTracking support #211

merged 4 commits into from
Dec 18, 2020

Conversation

JohnCampionJr
Copy link
Contributor

Closes #113.

Also adds related Attach functions so untracked entities can be added back to the context as needed. Kind of go hand in hand.

I'm trying to avoid hitting the context directly outside of MongoFramework, rather use the DbSet.

Let me know your thoughts. If merged, would appreciate a NuGet bump.

@Turnerj
Copy link
Member

Turnerj commented Dec 18, 2020

The AsNoTracking stuff looks good!

While I like the Attach and AttachRange methods, I'm not sure I want to deviate from where they are in Entity Framework (on the context). The attach methods, while can do their job through the MongoDbSet, they really are just piping commands to the MongoDbContext anyway. If you move it to the context (with the context interface being updated), I'm happy to merge this in.

@JohnCampionJr
Copy link
Contributor Author

Ok. Let me take a look. My first thought is that the check entity code for multi tenant is on the DbSet.

@JohnCampionJr
Copy link
Contributor Author

OK, moved Attach to context as well as the check entities methods so the DbSets can share those.

@Turnerj Turnerj merged commit cc45228 into TurnerSoftware:master Dec 18, 2020
@Turnerj Turnerj added enhancement Enhancements & features affects-querying Query-related issue minor-change Minor changes required labels Dec 18, 2020
@JohnCampionJr JohnCampionJr deleted the notracking branch December 19, 2020 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-querying Query-related issue enhancement Enhancements & features minor-change Minor changes required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "AsNoTracking" method
2 participants