public virtual ActionResult EditProgramLocation(ProgramLocationViewModel programLocationViewModel)
 {
     var location = Repository.Get<ProgramLocation>(programLocationViewModel.Id.Value);
     this.Validate(programLocationViewModel, string.Empty);
     if (!ModelState.IsValid)
     {
         var viewModel = Mapper.Map<ProgramLocation, ProgramLocationViewModel>(location);
         return View(Views.EditProgramLocation, viewModel);
     }
     Mapper.Map<ProgramLocationViewModel, ProgramLocation>(programLocationViewModel, location);
     return RedirectToAction(MVC.FlightPrograms.EditFlightProgram(programLocationViewModel.ProgramId));
 }
 public virtual ActionResult CreateProgramLocation(ProgramLocationViewModel programLocationViewModel)
 {
     this.Validate(programLocationViewModel, string.Empty);
     if (!ModelState.IsValid)
         return View(Views.CreateProgramLocation, programLocationViewModel);
     var program = Repository.Get<FlightProgram>(programLocationViewModel.ProgramId);
     var location = Mapper.Map<ProgramLocationViewModel, ProgramLocation>(programLocationViewModel);
     program.AddLocation(location);
     return RedirectToAction(MVC.FlightPrograms.EditFlightProgram(program.Id.Value));
 }