public ActionResult Edit(int id, Route route) { System.Threading.Thread.Sleep(2000); try { // Obtener el OBJETO Customer y agregarlo directamente //route.Customer = _customersService.GetCustomerById(id); _routesService.Update(route); return Json("Ruta modificada correctamente"); } catch (Exception exception) { return Json("Error modificar la ruta. " + exception.Message); } }
public void Update(Route route) { _unitOfWork.RoutesRepository.Update(route); _unitOfWork.Save(); }
public void Setup() { _url = new UrlPattern(Pattern); _route = _url.ToRouteDefinition(); }
public void Add(Route route) { _unitOfWork.RoutesRepository.Insert(route); _unitOfWork.Save(); }