public async Task <IActionResult> PostGenre([FromBody] Genre genre) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await _genreRepository.CreateGenreAsync(genre); return(RedirectToAction("GetGenre", new { id = genre.Id })); }
public async Task <IActionResult> PostGenre([FromBody] Genre genre) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await _genreRepository.CreateGenreAsync(genre); return(RedirectToAction("GetGenre", new { id = genre.Id })); }