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()); }
public async Task <IActionResult> RaiseQuery([FromBody] RaisedQueryRequestDto dto) { if (await _privateEntityExaminationService.RaiseQueryAsync(dto) > 0) { return(Created("", dto)); } return(BadRequest("Could not raise query")); }
public async Task <bool> RaiseQueryAsync(RaisedQueryRequestDto dto) { var response = await _client.PostAsJsonAsync("ex/pvt/q", dto); if (response.IsSuccessStatusCode) { return(true); } return(false); }