Assembly orders
This commit is contained in:
parent
dbd3e7b5ef
commit
1a849e4fbd
@ -36,6 +36,22 @@ namespace ComputerShopDatabaseImplement.Models
|
||||
return _assemblyComponents;
|
||||
}
|
||||
}
|
||||
|
||||
private Dictionary<int, (IOrderModel, int)>? _assemblyOrders = null;
|
||||
[NotMapped]
|
||||
public Dictionary<int, (IOrderModel, int)> AssemblyPrders
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_assemblyOrders == null)
|
||||
{
|
||||
_assemblyOrders = Orders
|
||||
.ToDictionary(recPC => recPC.OrderId, recPC =>
|
||||
(recPC.Order as IOrderModel, recPC.Count));
|
||||
}
|
||||
return _assemblyOrders;
|
||||
}
|
||||
}
|
||||
[ForeignKey("AssemblyId")]
|
||||
public virtual List<AssemblyComponent> Components { get; set; } = new();
|
||||
[ForeignKey("AssemblyId")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user