Ejemplo n.º 1
0
        public async Task <JObject> CreateItemAsync(MetaDataModel modelObject, string requestId = "")
        {
            _logger.LogInformation($"RequestId: {requestId} - MetaData_CreateItemAsync called.");

            Guard.Against.Null(modelObject, nameof(modelObject), requestId);
            try
            {
                var entityObject = MapToEntity(modelObject, requestId);

                return(await _metaDataRepository.CreateItemAsync(entityObject, requestId));
            }
            catch (Exception ex)
            {
                _logger.LogError($"RequestId: {requestId} - MetaData_CreateItemAsync Service Exception: {ex}");
                throw new ResponseException($"RequestId: {requestId} - MetaData_CreateItemAsync Service Exception: {ex}");
            }
        }