public async Task <IActionResult> Get(int ID) { var result = new GetCustomerPaymentCardQuery(ID); var wait = await meciater.Send(result); return(wait != null ? (IActionResult)Ok(wait) : NotFound()); }
public async Task <IActionResult> GetAsync(int id) { var result = new GetCustomerPaymentCardQuery(id); return(result != null ? (IActionResult)Ok(await _mediatr.Send(result)) : NotFound(new { Message = "Customer not found" })); }