public ConfigCascadeDeleteWithUserId(CascadeSoftDelDbContext context) : base(context) { GetSoftDeleteValue = entity => entity.SoftDeleteLevel; SetSoftDeleteValue = (entity, value) => { entity.SoftDeleteLevel = value; }; OtherFilters.Add(typeof(IUserId), entity => ((IUserId)entity).UserId == context.UserId); }
public ConfigSoftDeleteWithUserId(SingleSoftDelDbContext context) { GetSoftDeleteValue = entity => entity.SoftDeleted; SetSoftDeleteValue = (entity, value) => { entity.SoftDeleted = value; }; OtherFilters.Add(typeof(IUserId), entity => ((IUserId)entity).UserId == context.UserId); }