我有一个项目,我用Coefirst。 在我的项目中,我想实现SoftDelete
有两种方法。抽象类或SoftDelete接口
1:用户接口一样belowe:
public interface ISoftDelete
{
bool IsDeleted { get; set; }
}
如果我用这种方式,我要实现我想要softDelete所有类。
第二:使用抽象类像belowe:
public abstract class SoftDelete
{
public bool IsDelelted { get; set; }
}
我不知道哪一个更好,有在网络上没有类似的问题。
的可能的复制[接口或抽象类?(http://stackoverflow.com/questions/1165332/interface-or-abstract-class ) –