/// <summary>
        /// 新增Dto模型返回主键
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public async virtual Task <long> Insert(AttrBaseModel model)
        {
            long newIncreaseKet = 0;

            await this.TryCatch(async() =>
            {
                string sql     = model.InsertDtoModel();
                newIncreaseKet = await DbExtend.ExecuteNonQueryByKey(Context, sql, model, Tran);
                return(sql);
            });

            return(newIncreaseKet);
        }
        /// <summary>
        /// 新增返回自增主键
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        internal async virtual Task <long> InsertReturnKey <T>(T entity)
            where T : AttrEntityBase
        {
            long newIncreaseKet = 0;

            await this.TryCatch(async() =>
            {
                string sql     = entity.InsertEntity();
                newIncreaseKet = await DbExtend.ExecuteNonQueryByKey(Context, sql, entity, Tran);
                return(sql);
            });

            return(newIncreaseKet);
        }