示例#1
0
        /// <summary>
        ///     添加单个
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns>主键ID</returns>
        public virtual async Task <bool> Add(T entity)
        {
            IInsertable <T> insert = this.SugarClient.Insertable(entity);

            return(await insert.ExecuteCommandIdentityIntoEntityAsync());
        }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public Task <bool> ExecuteCommandIdentityIntoEntityAsync()
 {
     return(_insertable.ExecuteCommandIdentityIntoEntityAsync());
 }