op
This commit is contained in:
parent
060c5dc37f
commit
7bcfa7e0e0
@ -51,7 +51,16 @@ namespace ComputerHardwareStoreDatabaseImplement.Models
|
|||||||
Status = model.Status,
|
Status = model.Status,
|
||||||
DateCreate = model.DateCreate,
|
DateCreate = model.DateCreate,
|
||||||
DateImplement = model.DateImplement,
|
DateImplement = model.DateImplement,
|
||||||
Product = context.Products.First(x => x.Id == model.ProductId)
|
Products = context.Products
|
||||||
|
.Where(p => model.OrderProducts.ContainsKey(p.Id))
|
||||||
|
.Select(p => new OrderProduct()
|
||||||
|
{
|
||||||
|
OrderId = model.Id,
|
||||||
|
ProductId = p.Id,
|
||||||
|
Product = p,
|
||||||
|
Count = model.OrderProducts[p.Id].Item2
|
||||||
|
})
|
||||||
|
.ToList()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
public void Update(OrderBindingModel model)
|
public void Update(OrderBindingModel model)
|
||||||
@ -71,7 +80,5 @@ namespace ComputerHardwareStoreDatabaseImplement.Models
|
|||||||
DateCreate = DateCreate,
|
DateCreate = DateCreate,
|
||||||
DateImplement = DateImplement,
|
DateImplement = DateImplement,
|
||||||
};
|
};
|
||||||
|
|
||||||
public Dictionary<int, (IProductModel, int)> OrderProduct => throw new NotImplementedException();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user