public async Task <IActionResult> CreateEmail([FromBody] EmailDataInput emailData) { var result = await _emailsRepository.CreateEmail(emailData); if (result != null && result.Response) { return(Ok()); } return(StatusCode(500, result?.Message)); }
public async Task <int> Handle(CreateEmail request, CancellationToken cancellationToken) { return(await emailsRepository.CreateEmail(request.Email, cancellationToken)); }