Beispiel #1
0
        public IHttpActionResult Get([FromUri] SexoResource sexo)
        {
            IEnumerable <SexoResource> list = service.GetAll();

            if (list == null)
            {
                return(NotFound());
            }

            return(Ok(list));
        }
Beispiel #2
0
        //[Authorize]
        public IHttpActionResult Update([FromBody] SexoResource sexo)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            service.Update(sexo);

            return(Ok());
        }