예제 #1
0
        public ActionResult Put(int id, [FromBody] GeneroInputModel genero)
        {
            if (id != genero.Id)
            {
                return(BadRequest());
            }

            var generoUpd = _generoService.Put(id, genero);

            return(new CreatedAtRouteResult("GetGeneroDetails", new { Id = generoUpd.Id }, generoUpd));
        }
        public ActionResult Put(int id, [FromBody] GeneroInputModel Genero)
        {
            if (id != Genero.Id)
            {
                return(BadRequest());
            }

            var result = _GeneroService.Put(id, Genero);

            return(new CreatedAtRouteResult("GetGenerosDetails",
                                            new { id = result.Id }, result));
        }