public ActionResult BookHolidayHome(int Id) { HolidayHome model = repository.GetHolidayHomeById(Id); List <DateTime> list = repository.GetDaysBookedHolidayHome(Id); List <string> liststring = new List <string>(); foreach (var item in list) { liststring.Add(item.ToShortDateString()); } BookViewModel viewmodel = new BookViewModel(); viewmodel.holidayhome = model; viewmodel.list = liststring; return(View(viewmodel)); }