コード例 #1
0
        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));
        }
コード例 #2
0
 public async Task <int> Handle(CreateEmail request, CancellationToken cancellationToken)
 {
     return(await emailsRepository.CreateEmail(request.Email, cancellationToken));
 }