优化
This commit is contained in:
@@ -13,6 +13,7 @@ using WMS.Web.Core.Internal.Results;
|
|||||||
using WMS.Web.Domain.Entitys;
|
using WMS.Web.Domain.Entitys;
|
||||||
using WMS.Web.Domain.Infrastructure;
|
using WMS.Web.Domain.Infrastructure;
|
||||||
using WMS.Web.Domain.IService.Public;
|
using WMS.Web.Domain.IService.Public;
|
||||||
|
using WMS.Web.Domain.Mappers;
|
||||||
using WMS.Web.Domain.Values.Single;
|
using WMS.Web.Domain.Values.Single;
|
||||||
using WMS.Web.Repositories.Configuration;
|
using WMS.Web.Repositories.Configuration;
|
||||||
|
|
||||||
@@ -221,6 +222,7 @@ namespace WMS.Web.Repositories
|
|||||||
List<int> list = entitys.Select(s => s.Id).ToList();
|
List<int> list = entitys.Select(s => s.Id).ToList();
|
||||||
var res = await _context.BoxInventory.Include(x => x.Details).Where(f => list.Contains(f.Id)).ToListAsync();
|
var res = await _context.BoxInventory.Include(x => x.Details).Where(f => list.Contains(f.Id)).ToListAsync();
|
||||||
_mapper.Map(entitys, res);
|
_mapper.Map(entitys, res);
|
||||||
|
//_mapper.ToMapList(entitys.SelectMany(x=>x.Details).ToList(), res.SelectMany(x=>x.Details).ToList());
|
||||||
var tt= await _context.SaveChangesAsync();
|
var tt= await _context.SaveChangesAsync();
|
||||||
if (_transaction != null)
|
if (_transaction != null)
|
||||||
_transaction.Commit();
|
_transaction.Commit();
|
||||||
|
|||||||
Reference in New Issue
Block a user