0
daws created
.net core, angular, aspnetzero 8.8
We have a full audited entity :
[Audited]
public class MyEntity : FullAuditedEntity, IExtendableObject, IPassivable, IValidityRange
When we load it like this in a manager :
[UnitOfWork]
public async Task> GetAllActiveAsync(Expression> predicate)
{
return await _MyEntityRepository.GetAll().Where(x => x.IsActive).Where(predicate).ToListAsync();
}
Soft deleted entities are also loaded whereas they should not. We did not override GetAll in the repository.
We currently have a workaround but it's not clean :
public class MyDbContext : AbpZeroDbContext, IAbpPersistedGrantDbContext
{
...
modelBuilder.Entity().HasQueryFilter(p =>
!p.IsDeleted
);
}
How can we solve this ?
4 Answer(s)
-
0
Hi @daws
Sorry for my late reply. Could you share your Abp version as well ? We will try to reproduce it.
-
0
hi @ismcagdas,
Abp version is 6.3.1 (aspnetzero 8.8).
We plan to migrate to anz 13.3 in september. -
0
Hi **@daws **
I couldn't reproduce it on my project. Could you send an example project to info@aspnetzero.com
-
0
Hi there, since i have no time to produce a sample project, i will continue with my workaround.
thanks