コード例 #1
0
        public async Task <IActionResult> Create([FromBody] CreateClassificationRequest request)
        {
            try
            {
                var newClassification = await _hiarcDatabase.CreateClassification(request);

                var uri = $"{_hiarcSettings.BaseUri}/classifications/{newClassification.Key}";
                return(Created(uri, newClassification));
            }
            catch (Exception ex)
            {
                return(BuildErrorResponse(ex, _logger));
            }
        }