/// <summary> /// The is exist. /// </summary> /// <param name="idToCheck"> /// The id to check. /// </param> /// <returns> /// The <see cref="Task"/>. /// </returns> private async Task <bool> IsExist(int idToCheck) { var accountDetails = await this.mediator.Send( ByIdSingleQueryPattern.GetSingleLayoutQuery(idToCheck)); var result = accountDetails.Id != 0; return(result); }
public async Task <IActionResult> Get(int id) { var result = await this.Mediator.Send(ByIdSingleQueryPattern.GetSingleEventQuery(id)); return(new ObjectResult(new { Event = result })); }