Exemplo n.º 1
0
        public async Task <int> RaiseQueryAsync(RaisedQueryRequestDto dto)
        {
            var application = await _context.Applications.FindAsync(dto.ApplicationId);

            application.RaisedQueries.Add(_mapper.Map <RaisedQuery>(dto));
            return(await _context.SaveChangesAsync());
        }
Exemplo n.º 2
0
 public async Task <IActionResult> RaiseQuery([FromBody] RaisedQueryRequestDto dto)
 {
     if (await _privateEntityExaminationService.RaiseQueryAsync(dto) > 0)
     {
         return(Created("", dto));
     }
     return(BadRequest("Could not raise query"));
 }
Exemplo n.º 3
0
        public async Task <bool> RaiseQueryAsync(RaisedQueryRequestDto dto)
        {
            var response = await _client.PostAsJsonAsync("ex/pvt/q", dto);

            if (response.IsSuccessStatusCode)
            {
                return(true);
            }
            return(false);
        }