public ActionResult Edit(int id) { HotelInfos recordToEdit; recordToEdit = _HotelInfoRepo.HotelInfoById(id); var viewModel = new HotelInfos { //HotelTypeList = _HotelInfoRepo.GetHotelTypeList(), HotelRoomTypeList = _RoomTypeRepo.HotelRoomTypeList(), HotelRoomTypeAssociationList = _HotelInfoRepo.HotelRoomTypeList(id), HotelFacityList = _FacilityRepo.HotelFacilityList(), HotelFacilityAssociationList = _HotelInfoRepo.HotelFacilityList(id), HotelInfo = _HotelInfoRepo.HotelInfoLists(id), HotelContactInfo = _ContactRepo.HotelContactInfoHotelId(id), HotelCityInfo = _HotelInfoRepo.HotelCityList(id), HotelCityInfoList = _CityInfoRepo.HotelCityInfoList(), //HotelCityInfoAssociationSelectedCheckBoxList = _CityInfoAssociation.HotelCityInfoAssociationByHotelId(id), CountryList = _HotelInfoRepo.GetCountryList(), HotelAdditionalChargeList = _AdditionalChargeRepo.HotelAdditionalChargeList(), HotelAdditionalChargeAssociationList = _HotelInfoRepo.HotelAdditionalChargeList(id), DesignationList = _DesignationRepo.HotelDesignationList(), }; return(View("Edit", viewModel)); }