public IHttpActionResult SaveMusicGenre(string genre) { if (string.IsNullOrWhiteSpace(genre)) { return(BadRequest(Resources.EmptyGenre)); } try { _genreManager.AddMusicGenre(User.GetUserId(), genre); } catch (ValidationException exception) { return(BadRequest(exception.Message)); } return(StatusCode(HttpStatusCode.NoContent)); }