You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to exclude certain rows in the DB by default but otherwise rely on HC filters and projections. This is like EF's "Global FIlters" but for projected entities. Something like this:
[UseProjection]
[UseFiltering]
public IQueryable<Order> GetOrders(DbContext dbContext)
{
return dbContext.Orders
.Include(x => x.Items
.Where( y => !y.IsSoftDeleted));
}
HC appears to remove the soft delete where clause above when [Projection] is added. Is pre-filtering possible on projected entities?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We would like to exclude certain rows in the DB by default but otherwise rely on HC filters and projections. This is like EF's "Global FIlters" but for projected entities. Something like this:
HC appears to remove the soft delete where clause above when [Projection] is added. Is pre-filtering possible on projected entities?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions