public IActionResult Edit(int id) { var customerExists = customers.Exists(id); if (!customerExists) { return(RedirectToAction(nameof(All), new { order = "ascending" })); } var customer = this.customers.ById(id); var vm = new CustomerFormModel() { Id = customer.Id, Name = customer.Name, BirthDate = customer.BirthDate, IsYoungDriver = customer.IsYoungDriver }; return(View(vm)); }