public IActionResult PlaceAnimal(int ID) { var vm = new AnimalViewModel() { Lodgings = _lodgingService.ReturnAvailableLocations(ID), // Only get lodges with proper type & those that have space left. Animal = _animalService.FindByID(ID), Stay = _stayService.FindByID(ID), Lodge = _lodgingService.FindByID(ID) }; return(View(vm)); }
public IActionResult Edit(int ID) { var stay = _stayService.FindByID(ID); var vm = new StayViewModel() { Lodges = _lodgingService.ReturnAvailableLocations(stay.AnimalID), // Only get lodges with proper type & those that have space left. Stay = stay, CurrentLodge = _lodgingService.FindByID(stay.LodgingLocationID), Animal = _animalService.FindByID(stay.AnimalID) }; return(View(vm)); }