I'm working on small application with organizing hotel reservations in Entity Framework Core. I need to add information about number and the type of beds in every room. I was thinking and I decided that List of enums will be better, than storing it in separate table. But I don't know how to achieve it
public enum Bed
{
Single = 1,
Double = 2,
}
public class Room : IEntity
{
[Key]
public int Id { get; set; }
public string RoomIdentifier { get; set; }
public ICollection<Bed> Beds { get; set; }
public int Floor { get; set; }
public double Price { get; set; }
public bool IsFree { get; set; }
public bool IsOutOfService { get; set; }
public bool ShouldBeCleaned { get; set; }
public ICollection<RoomReservation> RoomReservations { get; set; }
}
Is it possible to do so? I was also thinking to save it as a string like (1,2,1,2) and then parse it to receive number and type of beds in room. Much thanks for help!