using System.Collections.Generic;
public static void Main()
var bookings = new List<Booking>()
new Booking { RoomId = 30943, OccupancyId = 0, ExtraId = 0, Date = new DateTime(2020-09-05) },
new Booking { RoomId = 30943, OccupancyId = 0, ExtraId = 0, Date = new DateTime(2020-09-06) },
new Booking { RoomId = 30943, OccupancyId = 0, ExtraId = 0, Date = new DateTime(2020-09-07) },
new Booking { RoomId = 30943, OccupancyId = 0, ExtraId = 0, Date = new DateTime(2020-09-05) },
new Booking { RoomId = 30943, OccupancyId = 0, ExtraId = 0, Date = new DateTime(2020-09-06) },
new Booking { RoomId = 30943, OccupancyId = 0, ExtraId = 0, Date = new DateTime(2020-09-07) }
var attemptedResult = new List<Room>()
new Room {RoomId = 30943, OccupancyId = 0, RatesByDay = new List<DateTime>{ new DateTime(2020-09-06), new DateTime(2020-09-05), new DateTime(2020-09-07)}},
new Room {RoomId = 30943, OccupancyId = 0, RatesByDay = new List<DateTime>{ new DateTime(2020-09-06), new DateTime(2020-09-05), new DateTime(2020-09-07)}}
public int RoomId { get; set; }
public int OccupancyId { get; set; }
public int ExtraId {get; set;}
public DateTime Date {get; set;}
public int RoomId { get; set; }
public int OccupancyId { get; set; }
public IEnumerable<DateTime> RatesByDay {get; set;}