src/MasterData/MasterData.Controllers/Controllers/DimensionStructureController.cs
/// <summary>
///     Controller method for adding new <see cref="DimensionStructure"/> objects.
/// </summary>
/// <param name="dimensionStructure">
///     <see cref="DimensionStructure"/> payload objects.
/// </param>
/// <param name="cancellationToken"> <see cref="CancellationToken"/>. </param>
/// <returns> A <see cref="Task{TResult}"/> representing the result of the asynchronous operation. </returns>
Controller method for adding new  objects.
Controller method for adding new objects .
[HttpPost]
        [Route(MasterDataApi.DimensionStructure.V1.Add)]
        [ProducesResponseType(StatusCodes.Status200OK)]
        [ProducesResponseType(StatusCodes.Status400BadRequest)]
        public async Task<ActionResult<DimensionStructure>> AddAsync(
            DimensionStructure dimensionStructure,
            CancellationToken cancellationToken = default)
        {
            try
            {
                DimensionStructure result = await _masterDataBusinessLogic.MasterDataDimensionStructureBusinessLogic
                   .AddAsync(dimensionStructure, cancellationToken)
                   .ConfigureAwait(false);
                return Ok(result);
            }
            catch (Exception e)
            {
                return BadRequest(e);
            }
        }
[ HttpPost ] [ Route ( MasterDataApi . DimensionStructure . V1 . Add ) ] [ ProducesResponseType ( StatusCodes . Status200OK ) ] [ ProducesResponseType ( StatusCodes . Status400BadRequest ) ] public async Task < ActionResult < DimensionStructure > > AddAsync ( DimensionStructure dimensionStructure , CancellationToken cancellationToken = default ) { try { DimensionStructure result = await _masterDataBusinessLogic . MasterDataDimensionStructureBusinessLogic . AddAsync ( dimensionStructure , cancellationToken ) . ConfigureAwait ( false ) ; return Ok ( result ) ; } catch ( Exception e ) { return BadRequest ( e ) ; } }
Controller method for adding new  objects.
Controller method for adding new objects .
A  representing the result of the asynchronous operation.
A representing the result of the asynchronous operation .
dimensionStructure
DimensionStructure
None
cancellationToken
CancellationToken
None