コード例 #1
0
        public async Task <int> UpdateAsync(BaseEntity model)
        {
            Task <int> ret;
            string     sql = SQLBuilderHelper.GetUpdateSql(model, this.GetORMDBType());

            ret = ExcuteAsync(sql, model);
            return(await ret);
        }
コード例 #2
0
        public int Update(BaseEntity model)
        {
            int    ret = 0;
            string sql = SQLBuilderHelper.GetUpdateSql(model, this.GetORMDBType());

            ret = Excute(sql, model);
            return(ret);
        }
コード例 #3
0
 public async Task <int> BatchUpdateAsync <T>(List <T> list) where T : BaseEntity
 {
     if (list != null && list.Count > 0)
     {
         string sql = SQLBuilderHelper.GetUpdateSql(list.First(), this.GetORMDBType());
         return(await ExcuteAsync(sql, list));
     }
     return(0);
 }
コード例 #4
0
        /// <summary>
        /// 批量修改
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="list"></param>
        /// <returns></returns>
        public int BatchUpdate <T>(List <T> list) where T : BaseEntity
        {
            int ret = 0;

            if (list != null && list.Count > 0)
            {
                string sql = SQLBuilderHelper.GetUpdateSql(list.First(), this.GetORMDBType());
                ret = Excute(sql, list);
            }
            return(ret);
        }