コード例 #1
0
ファイル: BaseRepository.cs プロジェクト: geekkeeper/iODS
        /// <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
ファイル: SugarWInsertable.cs プロジェクト: litesz/WFw
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public Task <bool> ExecuteCommandIdentityIntoEntityAsync()
 {
     return(_insertable.ExecuteCommandIdentityIntoEntityAsync());
 }