Skip to content

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