Entity Framework - Entity always filtered implicitly

37 Views Asked by At

I have a typical table which now has a new property named Inactive. The name is self-explanatory, the records that are marked as Inactive should not be visible.

Then I have several code that access this DbSet entity, and of corse the typical approach would be to manually filter everywhere Inactive == false

So I thought it should be possible to filter it by default and when I don't want this behaviour I would explicitly apply my filtering condition on that column.

Can you help on that?

Thanks

0

There are 0 best solutions below