/// <summary> /// 删除实体记录集合 /// </summary> /// <param name="entities"> 实体记录集合 </param> public void Delete(IEnumerable <TEntity> entities) { HContext.RegisterDel <TEntity, TKey>(entities); HContext.Commit(); }
/// <summary> /// 删除实体记录 /// </summary> /// <param name="entity"> 实体对象 </param> public void Delete(TEntity entity) { HContext.RegisterDel <TEntity, TKey>(entity); HContext.Commit(); }
/// <summary> /// 插入实体记录 /// </summary> /// <param name="entity"> 实体对象 </param> public void Insert(TEntity entity) { HContext.RegisterNew <TEntity, TKey>(entity); HContext.Commit(); }
/// <summary> /// 批量插入实体记录集合 /// </summary> /// <param name="entities"> 实体记录集合 </param> public void Insert(IEnumerable <TEntity> entities) { HContext.RegisterNew <TEntity, TKey>(entities); HContext.Commit(); }
/// <summary> /// 更新实体记录 /// </summary> /// <param name="entity"> 实体对象 </param> public void Update(TEntity entity) { HContext.RegisterMod <TEntity, TKey>(entity); HContext.Commit(); }