ISEbd-21.Gordeev.I.V.SushiB.../SushiBar/SushiBarDatabaseImplement/Models/SushiIngredient.cs

29 lines
630 B
C#

using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
namespace SushiBarDatabaseImplement.Models
{
[DataContract]
public class SushiIngredient
{
[DataMember]
public int Id { get; set; }
[Required]
[DataMember]
public int SushiId { get; set; }
[Required]
[DataMember]
public int IngredientId { get; set; }
[Required]
[DataMember]
public int Count { get; set; }
public virtual Ingredient Ingredient { get; set; } = new();
public virtual Sushi Sushi { get; set; } = new();
}
}