public ActionResult Post([FromBody] GeneroInputModel Genero) { var result = _GeneroService.Post(Genero); return(new CreatedAtRouteResult("GetGenerosDetails", new { id = result.Id }, result)); }
public GeneroViewModel Post(GeneroInputModel genero) { var generoAdd = _mapper.Map <Genero>(genero); _uow.GeneroRepository.Add(generoAdd); _uow.Commit(); return(_mapper.Map <GeneroViewModel>(generoAdd)); }
public GeneroViewModel Put(int id, GeneroInputModel genero) { var generoUpd = _mapper.Map <Genero>(genero); _uow.GeneroRepository.Update(generoUpd); _uow.Commit(); return(_mapper.Map <GeneroViewModel>(generoUpd)); }
public GeneroViewModel Put(int id, GeneroInputModel GeneroInputModel) { var Genero = _mapper.Map <Genero>(GeneroInputModel); _uow.GeneroRepository.Update(Genero); _uow.Commit(); return(_mapper.Map <GeneroViewModel>(Genero)); }
public GeneroViewModel Post(GeneroInputModel GeneroInputModel) { var Genero = _mapper.Map <Genero>(GeneroInputModel); _uow.GeneroRepository.Add(Genero); _uow.Commit(); return(_mapper.Map <GeneroViewModel>(Genero)); }
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)); }
public ActionResult Post([FromBody] GeneroInputModel genero) { var generoAdd = _generoService.Post(genero); return(new CreatedAtRouteResult("GetGeneroDetails", new { Id = generoAdd.Id }, generoAdd)); }