public async Task <IActionResult> RegisterAsync([FromBody] RegisterMeasureCategoryCommand command)
        {
            bool validCommand = command.Validate();

            if (!validCommand)
            {
                return(CreateErrorResponse(command.ValidationResult));
            }

            MeasureCategory measureCategory = new MeasureCategory(
                command.Name,
                command.Description,
                command.IsFavorite
                );

            await _measureCategoryRepository.RegisterAsync(measureCategory);

            return(await CommitAsync());
        }
 public async Task <IActionResult> RegisterAsync([FromBody] RegisterMeasureCategoryCommand command)
 {
     return(await CreateCommandResponse(command));
 }