errors fix
This commit is contained in:
@@ -27,6 +27,8 @@ namespace ComputerShopDatabaseImplement.Models
|
||||
public virtual List<SupplyOrder> SupplyOrders { get; set; } = new();
|
||||
[ForeignKey("OrderId")]
|
||||
public virtual List<AssemblyOrder> Assemblies { get; set; } = new();
|
||||
[Required]
|
||||
public int ClientId { get; set; }
|
||||
public static Order? Create(OrderBindingModel model)
|
||||
{
|
||||
if (model == null)
|
||||
|
||||
@@ -26,18 +26,17 @@ namespace ComputerShopDatabaseImplement.Models
|
||||
public int OrderId { get; set; }
|
||||
|
||||
public int ReceivingId { get; set; }
|
||||
private Dictionary<int, (IOrderModel, int)>? _supplyOrders =
|
||||
private Dictionary<int, IOrderModel>? _supplyOrders =
|
||||
null;
|
||||
[NotMapped]
|
||||
public Dictionary<int, (int, IOrderModel)> SupplyOrders
|
||||
public Dictionary<int, IOrderModel> SupplyOrders
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_supplyOrders == null)
|
||||
{
|
||||
_supplyOrders = Orders
|
||||
.ToDictionary(recPC => recPC.SupplyId, recPC =>
|
||||
(recPC.OrderId, recPC.Order as IOrderModel));
|
||||
.ToDictionary(recPC => recPC.SupplyId, recPC => recPC.Order as IOrderModel);
|
||||
}
|
||||
return _supplyOrders;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user