public static Booking Create(string contactId, DateTime date, TimePart startTime, TimeSpan length, Room room, Rate rate, Product product) { return new Booking { MainContactId = contactId, Date = date, StartTime = startTime, Length = length, Rooms = new List<Room> { room }, Rate = rate, Product = product }; }
public BookingList ForRoom(Room toCheck, DayOfWeek day) { var result = Bookings.Where(x => x.Rooms.Any(y => y.Id == toCheck.Id)).ToList(); return new BookingList { Bookings = result, IsAWeekend = (day == DayOfWeek.Saturday || day == DayOfWeek.Sunday) }; }