public ActionResult Delete(string id, Endpoint model) { var endpoint = reader.GetEndpoint(id); reader.DeleteEndpoint(endpoint); return(RedirectToAction("Details", new { id = "edit", item = endpoint.ServiceNameId })); }