public ActionResult Details(int?id) { if (id == null) { return(HttpNotFound()); } Rol rol = rolservice.FindById(id); return(View(rol)); }
public NameResponse GetRol(int id) { NameResponse response = new NameResponse(); try { Rol rol = rolServ.FindById(id); response.id = rol.id; response.name = rol.name; } catch (Exception exception) { Console.WriteLine(exception.Message.ToString()); } return(response); }