-
Notifications
You must be signed in to change notification settings - Fork 82
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
Upsert on IQueryable<Entity> #148
Comments
I have a similar request (or question, really). I would like to ignore the query filters when upserting but it doesn't seem possible to do this. I could be missing something fundamental / obvious, but I can't seem to find anything related to For posterity: the factory which creates/resolves the DbContext can be overridden and new parameters added to the constructor of the |
@Kalshu - I don't think I'd be able to easily support running upserts on an IQueryable. I need the reference to either the DbContext or the DbSet to be able to get the table metadata, so that I can generate the SQL statements that execute the upsert call. IQueryable of an entity is also a non realised collection, and even if it was an input to the upsert command, I'd have to load it all into memory to be able to generate the query. |
@JimHume your situation seems pretty different, but interesting.. Unfortunately my day to day work doesn't require EF Core use these days, so I don't have as much experience with this |
In my case, i want to make an upsert in place of ExecuteUpdateAsync (only usable for an update
But the return of the SelectMany is an IQueryable of an entity.
Is there any plan to support upsert on a different object than DbContext?
The text was updated successfully, but these errors were encountered: