Исправление Dinner. Добавление и заполнение RoomDinner и ConferenceBookingDinner в DataBaseImplement.

This commit is contained in:
Кашин Максим 2023-04-02 15:45:08 +04:00
parent c10db2e633
commit 257e7b3b4d
3 changed files with 45 additions and 3 deletions

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelDataBaseImplement.Models
{
public class ConferenceBookingDinner
{
public int Id { get; set; }
public int ConferenceBookingId { get; set; }
public int DinnerId { get; set; }
[Required]
public int Count { get; set; }
public virtual ConferenceBooking ConferenceBookings { get; set; }
public virtual Dinner Dinners { get; set; }
}
}

View File

@ -20,13 +20,13 @@ namespace HotelDataBaseImplement.Models
[Required]
public double DinnetPrice { get; set; }
public virtual Headwaiter Headwaiter { get; set; }
public virtual Headwaiter Headwaiters { get; set; }
[ForeignKey("DinnerId")]
public virtual List<RoomHeadwaiter> RoomHeadwaiters { get; set; }
public virtual List<RoomDinner> RoomDinners { get; set; }
[ForeignKey("DinnercId")]
public virtual List<ConferenceBookingHeadwaiter> ConferenceBookingHeadwaites { get; set; }
public virtual List<ConferenceBookingDinner> ConferenceBookingDinners { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelDataBaseImplement.Models
{
public class RoomDinner
{
public int Id { get; set; }
public int RoomId { get; set; }
public int DinnerId { get; set; }
[Required]
public int Count { get; set; }
public virtual Room Rooms { get; set; }
public virtual Dinner Dinners { get; set; }
}
}