PIbd-22_Shabunov_O.A._SushiBar/SushiBarDatabaseImplement/Models/DishIngredient.cs

24 lines
501 B
C#

using System.ComponentModel.DataAnnotations;
namespace SushiBarDatabaseImplement.Models
{
public class DishIngredient
{
[Key]
public int Id { get; set; }
[Required]
public int DishId { get; set; }
public virtual Dish Dish { get; set; } = new();
[Required]
public int IngredientId { get; set; }
public virtual Ingredient Ingredient { get; set; } = new();
[Required]
public int Count { get; set; }
}
}