public ActionResult EditCustomer(Customer customer) { var model = new CustomerModel(); if (ModelState.IsValid) { model.UpdateCustomer(customer); string methodToInvoke = model.IsCustomerAPrivateType(customer.CustomerType.Id) ? "ShowPrivateCustomers" : "ShowLegalCustomers"; return(RedirectToAction(methodToInvoke, "Customer")); } customer.CustomerTypes = model.GetCustomerTypes(); return(View()); }