op
This commit is contained in:
parent
26a687363e
commit
fb7db4b90b
@ -51,12 +51,14 @@ namespace ComputerHardwareStoreDatabaseImplement.Models
|
||||
Status = model.Status,
|
||||
DateCreate = model.DateCreate,
|
||||
DateImplement = model.DateImplement,
|
||||
Products = model.OrderProducts
|
||||
.Select(op => new OrderProduct()
|
||||
Products = context.Products
|
||||
.Where(p => model.OrderProducts.ContainsKey(p.Id))
|
||||
.Select(p => new OrderProduct()
|
||||
{
|
||||
OrderId = model.Id,
|
||||
ProductId = op.Key,
|
||||
Count = op.Value.Item2
|
||||
ProductId = p.Id,
|
||||
Product = p,
|
||||
Count = model.OrderProducts[p.Id].Item2
|
||||
})
|
||||
.ToList()
|
||||
};
|
||||
@ -78,7 +80,5 @@ namespace ComputerHardwareStoreDatabaseImplement.Models
|
||||
DateCreate = DateCreate,
|
||||
DateImplement = DateImplement,
|
||||
};
|
||||
|
||||
public Dictionary<int, (IProductModel, int)> OrderProduct => throw new NotImplementedException();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user