Open Kalshu opened 1 year ago
I have a similar request (or question, really).
My model builder adds HasQueryFilter(item => !item.IsDeleted)
(e.g.) logic during the OnModelCreating
method of the context itself.
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 IgnoreQueryFilter
or HasQueryFilter
with FlexLabs.
For posterity: the factory which creates/resolves the DbContext can be overridden and new parameters added to the constructor of the DbContext
so that the adding of HasQueryFilter
is optional, but this seems like an awkward workaround for a very specific / isolated issue.
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?