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

EF Core 3 Preview 8 QueryFilter not working #17332

Closed
phillipbritain opened this issue Aug 21, 2019 · 1 comment
Closed

EF Core 3 Preview 8 QueryFilter not working #17332

phillipbritain opened this issue Aug 21, 2019 · 1 comment

Comments

@phillipbritain
Copy link

phillipbritain commented Aug 21, 2019

I am having problems getting this to work. Here is my EF mapping:

modelBuilder.Entity<UserProject>(entity =>
 {
      entity.HasQueryFilter(p => !p.IsDeleted);
 });

I am using a repository pattern if that makes a difference. Here is my implementation:

var test = _rw.UserProject.FindAll().ToList();

_rw is Repository Wrapper which just exposes the DbSets of the DbContext. The FindAll() function only exposes the DbSet.

public virtual IQueryable<T> FindAll()
{
     return _db.Set<T>();
}

Other than that I can't think of any reason why this wouldn't work but perhaps I'm missing something.

@smitpatel
Copy link
Contributor

Duplicate of #15264

It is available in nightly builds.

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants