private async Task <bool> IsExist(int idToCheck) { var accountDetails = await this.mediator.Send( ByIdSingleQueryPattern.GetSingleAreaQuery(idToCheck)); var result = accountDetails.Id != 0; return(result); }
public async Task <IActionResult> Get(int id) { var result = await this.Mediator.Send(ByIdSingleQueryPattern.GetSingleAreaQuery(id)); return(new ObjectResult(new { area = result })); }