public IHttpActionResult AddGenreToInventory(AddGenreViewModel viewModel) { if (!ModelState.IsValid) { return(BadRequest("Invalid Model State")); } var genre = _mapper.Map <Genre>(viewModel); _inventoryService.AddGenre(genre); return(Ok()); }