Пример #1
0
 /// <summary>
 /// 根据主键ID删除实体
 /// 调用方法 例如:dbContext.DeleteEntity<Member/>(new Member { Id = 1 });
 /// CreateDate:2014年9月5日 17:17:51
 /// </summary>
 /// <typeparam name="TEntity"></typeparam>
 /// <param name="isSave"></param>
 /// <param name="entities"></param>
 public int DeleteEntity(bool isSave = false, params TEntity[] entities)
 {
     EFContext.DeleteEntity(entities);
     return(isSave ? EFContext.Commit() : 0);
 }