public ColliListBO Convert(ColliList colliList) { if (colliList == null) { return(null); } return(new ColliListBO() { Id = colliList.Id, ItemType = colliList.ItemType, FreightType = colliList.FreightType, IsActive = colliList.IsActive, Dimensions = colliList.Dimensions, NetWeight = colliList.NetWeight, TotalWeight = colliList.TotalWeight, ProjectName = colliList.ProjectName, Worker = colliList.Worker, PackingListIds = colliList.PackingLists?.Select(p => p.PackingListID).ToList(), ColliItemsIds = colliList.ColliItems?.Select(ci => ci.Id).ToList() }); }
public ColliList Create(ColliList colliList) { _context.ColliLists.Add(colliList); return(colliList); }