0
vyungadmin created
ABP document is :
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Filter("PersonFilter", (IHasPerson entity, int personId) => entity.PersonId == personId, 0 );
}
but on zero PortalDbContext class , method OnModelCreating the parms type not DbModelBuilder, it is ModelBuilder. as follows:
protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); ... }
How can I add cutom global data filter?
3 Answer(s)
-
1
What is product framework type (.net framework or .net core)?
-
1
Hi, currently the documentation for data filter is only provide example for enitity framework not ef core.
For ef core, you can take a look at https://aspnetboilerplate.com/Pages/Documents/Articles\How-To\add-custom-data-filter-ef-core
-
0
@maliming @ryancyq .net framework4.6.1