using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ElectronicsShopDataBaseImplement.Models { public class OrderProduct { public int Id { get; set; } [ForeignKey("OrderID")] public int OrdersID { get; set; } [ForeignKey("ProductID")] public int ProductID { get; set; } [Required] public int Count { get; set; } [ForeignKey("OrderID")] public virtual Order _order { get; set; } = new(); [ForeignKey("ProductID")] public virtual Product _product { get; set; } = new(); } }