public HttpResponseMessage Get(HttpRequestMessage request, int id)
        {
            HttpResponseMessage response = null;

            if (!ModelState.IsValid)
            {
                response = request.CreateResponse(HttpStatusCode.BadRequest);
            }
            else
            {
                var dtoUpdated = perfilService.GetById(id);
                response = request.CreateResponse(HttpStatusCode.OK, dtoUpdated);
            }

            return(response);
        }
示例#2
0
        public PERFIL GetByID(Int32 id)
        {
            PERFIL perfil = _perfilService.GetById(id);

            return(perfil);
        }