CourseWorkElectronicsShop/ElectronicsShop/ElectronicsShopDataBaseImplement/Models/OrderProduct.cs

27 lines
683 B
C#
Raw Normal View History

2024-04-29 18:34:49 +04:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
2024-04-30 21:59:22 +04:00
using System.ComponentModel.DataAnnotations.Schema;
2024-04-29 18:34:49 +04:00
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataBaseImplement.Models
{
2024-05-25 13:06:38 +04:00
public class OrderProduct
2024-04-29 18:34:49 +04:00
{
2024-05-25 13:06:38 +04:00
public int Id { get; set; }
2024-04-30 21:59:22 +04:00
[ForeignKey("OrderID")]
2024-04-29 18:34:49 +04:00
public int OrdersID { get; set; }
2024-04-30 21:59:22 +04:00
[ForeignKey("ProductID")]
2024-04-29 18:34:49 +04:00
public int ProductID { get; set; }
[Required]
public int Count { get; set; }
public virtual Order _order { get; set; } = new();
public virtual Product _product { get; set; } = new();
}
}