|
@@ -281,15 +281,14 @@ namespace Luticate2.Utils.DataAccess
|
281
|
281
|
{
|
282
|
282
|
return Execute((db, table) =>
|
283
|
283
|
{
|
284
|
|
- var models = GetEditQueryable(db, table).Where(predicate).AsNoTracking();
|
285
|
|
- var editedDbos = new List<TDboRead>();
|
|
284
|
+ var models = GetEditQueryable(db, table).Where(predicate).AsNoTracking().ToList();
|
286
|
285
|
foreach (var model in models)
|
287
|
286
|
{
|
288
|
287
|
update(model);
|
289
|
|
- editedDbos.Add(GetDboFromModel(model));
|
290
|
288
|
db.Entry(model).State = EntityState.Modified;
|
291
|
289
|
}
|
292
|
290
|
db.SaveChanges();
|
|
291
|
+ var editedDbos = models.Select(GetDboFromModel).ToList();
|
293
|
292
|
var res = returnFunc(editedDbos);
|
294
|
293
|
return LuResult<T>.Ok(res);
|
295
|
294
|
});
|