public int Delete <T>(object id) where T : class
 {
     using (var db = new PetaDbContext())
     {
         return(db.Delete <T>(id));
     }
 }
        /// <summary>
        /// Remark:删除对象实体系列重载方法
        /// </summary>
        #region 数据删除方法

        public static int Delete(object obj)
        {
            using (var db = new PetaDbContext())
            {
                return(db.Delete(obj));
            }
        }
示例#3
0
 public int Delete(object id)
 {
     using (var db = new PetaDbContext())
     {
         return(db.Delete <T>(id));
     }
 }