Пример #1
0
 public Task <Result> CreateApplicationRepository(Request_FApplicationCreateDto request)
 {
     throw new NotImplementedException();
 }
Пример #2
0
        public async Task <ActionResult <Response_FApplicationGetInfoDto> > CreateApplicaitonRepository([FromBody] Request_FApplicationCreateDto request)
        {
            if (!this.ModelState.IsValid)
            {
                return(BadRequest(this.ModelState));
            }

            var result = await _applicationService.CreateApplicationRepository(request);

            if (result)
            {
                // Return 201 with the Location header indicating how to retrieve the resource, and the state of the resource after it was created
                return(Created($"application/{(result as DataResult<Response_FApplicationGetInfoDto>)?.Data.Id}", new
                {
                    Data = (result as DataResult <Response_FApplicationGetInfoDto>)?.Data,
                    Messages = _messageProvider.Messages
                }));
            }
            else
            {
                // There was some reason the resource does not exist in the database, so something was wrong with the request, return 400
                return(BadRequest(_messageProvider.Messages));
            }
        }
Пример #3
0
 public abstract Task <Result> CreateApplicationRepository(Request_FApplicationCreateDto request);