示例#1
0
        public async Task <IActionResult> Post_EntityOK([FromBody] Entity.V1.Input body)
        {
            var request = new Post_EntityRequest.V1()
            {
                EntityId = body.EntityId
            };

            var res = await _requestProcessor.ExecuteAsync(request, default);

            return(this.Ok(res));
        }
示例#2
0
        public async Task <IActionResult> Post([FromBody] Polymorphic entity, CancellationToken ctk = default)
        {
            var request = new Post_PolymorphicRequest.V1()
            {
                Entity = entity,
            };

            var res = await _requestProcessor.ExecuteAsync(request, ctk);

            return(this.Ok(res));
        }
示例#3
0
        public async Task <IActionResult> Post([FromRoute] string blId, [FromBody] Contract.Input contract, CancellationToken ctk = default)
        {
            contract.BusinessLineId = blId;

            var request = new Contract_CreateRequest.V1()
            {
                Entity = contract
            };

            var res = await _requestProcessor.ExecuteAsync(request, ctk);

            return(Ok(res));
        }
示例#4
0
        public async Task <IActionResult> Post(IFormFile file, IFormFile file2, CancellationToken ctk = default)
        {
            _logger.Trace($@"UploadFile: { file.FileName }");

            if (file.Length > 0)
            {
                var request = new Post_FileImportRequest.V1()
                {
                    FileName = file.FileName,
                    File     = file.OpenReadStream(),
                };

                var res = await _requestProcessor.ExecuteAsync(request, ctk);

                return(Ok(res));
            }
            else
            {
                return(NoContent());                //????
            }
        }