public MenuMapping(Microsoft.Data.Entity.Metadata.Builders.EntityTypeBuilder <Menu> entityBuilder) { entityBuilder.HasKey(x => x.ID); entityBuilder.Property(x => x.Day).IsRequired().HasColumnType("int"); entityBuilder.HasMany(x => x.Items).WithOne().IsRequired(); }
public OrderMapping(Microsoft.Data.Entity.Metadata.Builders.EntityTypeBuilder <Order> entityBuilder) { entityBuilder.HasKey(x => x.ID); entityBuilder.Property(x => x.Price).IsRequired().HasColumnType("decimal"); entityBuilder.Property(x => x.TableNumber).HasColumnType("int").IsRequired(); entityBuilder.Property(x => x.Status).HasColumnType("int").IsRequired(); entityBuilder.HasMany(x => x.Items).WithOne().IsRequired(); }