public async Task <GenreDto> EditGenre(int id, EditGenreCommand command) { var genre = await this.Find(id); genre.Name = command.Name; genre = await this.Update(genre); return(genre.ToDto()); }
public async Task <IActionResult> Edit(EditGenreCommand Genre) { await Mediator.Send(Genre); return(RedirectToAction("Index")); }
public async Task <IHttpActionResult> Update(int id, [FromBody] EditGenreCommand command) { return(await this.Try(async() => await this._genreRepository.EditGenre(id, command))); }