public async Task <IActionResult> AddMovieClassificationAssync([FromBody] NewMovieClassificationDto dto) { var errors = GetErrorListFromModelState(); if (errors.Any()) { return(BadRequest(errors)); } var claims = ((System.Security.Claims.ClaimsIdentity)User.Identity).Claims.ToList(); dto.UserId = Guid.Parse(claims.FirstOrDefault(a => a.Type == System.Security.Claims.ClaimTypes.Name).Value); await _movieService.AddMovieClassificationAsync(dto); return(Ok()); }