чуть добавила

This commit is contained in:
Полина Чубыкина 2024-06-21 20:06:15 +04:00
parent cd826c1b51
commit 44b6dfdcb7

View File

@ -37,6 +37,8 @@ namespace ConfectioneryDatabaseImplement.Models
public virtual List<PastryComponent> Components { get; set; } = new(); public virtual List<PastryComponent> Components { get; set; } = new();
[ForeignKey("PastryId")] [ForeignKey("PastryId")]
public virtual List<Order> Orders { get; set; } = new(); public virtual List<Order> Orders { get; set; } = new();
[ForeignKey("PastryId")]
public virtual List<ShopPastry> ShopPastries { get; set; } = new();
public static Pastry Create(ConfectioneryDatabase context, PastryBindingModel model) public static Pastry Create(ConfectioneryDatabase context, PastryBindingModel model)
{ {
return new Pastry() return new Pastry()