public async Task <IActionResult> MakeAttractionVisible(int id) { var attraction = await _attractionRepository.GetAsync(id); attraction.IsVisibleToClient = true; await _attractionRepository.SaveAsync(); return(await LoadActiveAttractions()); }
public async Task <IActionResult> SubmitEditAttractionForm(EditAttractionViewModel vm) { var attraction = await _attractionRepository.GetAsync(vm.Id); attraction.Name = vm.Name; attraction.Description = vm.Description; attraction.Link = vm.Link; attraction.IsVisibleToClient = vm.IsVisibleToClient; await _attractionRepository.SaveAsync(); return(RedirectToAction("LoadActiveAttractions", "Admin")); }