Beispiel #1
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(HttpNotFound());
            }
            Rol rol = rolservice.FindById(id);

            return(View(rol));
        }
Beispiel #2
0
        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);
        }