public ActionResult Replace(int idTarget, int idMoved) { try { var movedbranche = _catalogRepository.GetCatalogById(idMoved); _catalogRepository.ChangeBranchLocation(movedbranche, idTarget); return(RedirectToAction("Index")); } catch (Exception e) { return(View("Error")); } }