public async Task<IActionResult> AddAsync( [FromBody] [Required] WorkoutAdditionDto newWorkoutDto, CancellationToken cancellationToken) { var currentUserId = _userManager.GetUserIdAsInt(HttpContext.User); var now = DateTimeOffset.Now; var mappedWorkout = _mapper.Map<WorkoutEntity>(newWorkoutDto); mappedWorkout.UserId = currentUserId; mappedWorkout.CreatedOn = now; mappedWorkout.ModifiedOn = now; await _workout.DoAddAsync(mappedWorkout, newWorkoutDto.FileIds, cancellationToken) .ConfigureAwait(false); return Ok(); }