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