Skip to content
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

Optionally exclude soft deleted records without explicit where condition #20

Open
esentio opened this issue Apr 7, 2018 · 0 comments
Open
Labels
feature New feature or request

Comments

@esentio
Copy link
Owner

esentio commented Apr 7, 2018

Currently, you have to explicitly exclude soft deleted records with where condition. It would be convenient to exclude these records automatically. Other ORMs solve this with something like global filter.

Proposition:
In OnConfiguring, use DbContextOptionsBuilder to set default behavior via flag enum:

  • do nothing (default)
  • exclude soft deleted records (main table/entity)
  • exclude soft deleted joined records

There should be possibility to override this behavior in each query. Investigate what's best API for that.

Related: besides this scenario, is there need for global filters?

@esentio esentio added the feature New feature or request label Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant