public async Task <int> UpdateAsync(BaseEntity model) { Task <int> ret; string sql = SQLBuilderHelper.GetUpdateSql(model, this.GetORMDBType()); ret = ExcuteAsync(sql, model); return(await ret); }
public int Update(BaseEntity model) { int ret = 0; string sql = SQLBuilderHelper.GetUpdateSql(model, this.GetORMDBType()); ret = Excute(sql, model); return(ret); }
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); }
/// <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); }