预定义的过滤 ISoftDelete 软删除过滤用来在查询数据库时,自动过滤(从结果中抽取)已删除的实体.如果一个实体可以被软删除,它必须实现ISoftDelete接口,该接口只定义了一个IsDeleted属性,例如: public class Person : Entity, ISoftDelete { public virtual string Name { get; set; } public virtual bool IsDeleted { get; set; } } 不会真实删除数据
Introduction It's common to use the soft-deletepattern which is used to not delete an entity from database but only mark it as 'deleted'. So, if an entity is soft-deleted, it should not be accidently retrieved into the application. To provide that, w
log4的使用方法: log4是具有日志记录功能,主要通过一个配置文件来对程序进行监测有两种配置方式:一种程序配置,一种文件配置有三个主要单元要了解,Logger,appender,layout. logger是进行记录的主要类,appender是记录的方式,layout是记录的格式logger七种日志级别:debug,info,warn,error,fatal,all,off最常用的应该是debug()和info():而warn().error().fatal()仅在相应事件发生后才使用 ap
1.问题的缘起 考察下面的类结构定义 public class Category { string _id; Category _parent; IList<Category> _children = new List<Category>(); public virtual string Id { get { return _id; } } public virtual Category Parent { get { return _parent; } } public virtu