/// <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 Insert(TEntity entity) { HContext.RegisterNew <TEntity, TKey>(entity); HContext.Commit(); }