IsSoftDeleted
このDbSetからアイテムをフィルタリングするにはどうすればよいですか?
var type = GetTypeFromString("Whatever");
var whatevers = Set(type);
方法
public dynamic Set(Type type)
{
var set = dbContext.Set(type);
return set;
}
モデル
public class Whatever : BaseEntity
{
public virtual string Name { get; set; }
}
public class BaseEntity
{
public virtual int Id { get; set; }
public virtual bool? IsSoftDeleted { get; set; }
}
編集:表示するのを忘れたからWhatever
派生BaseEntity