1
Good morning, I have an ASP.NET MVC 5 application that opens IT calls, I have a procedure that triggers e-mail to users at the end of the task execution (completion, opening, forwarding, etc. of the calls). I need to turn this email firing procedure into asynchronous, and I did that. But I couldn’t make the procedure call in Action since Action is not asynchronous.
That way, I know that the activity of sending email continues non-synchronistic. To define it asynchronous I have to define the entire Action also asynchronous? I can’t just define the procedure?
[HttpPost]
public ActionResult DetalhaChamado(Chamado objChamado)
{
// .. . AÇÕES DA ACTION
if (email != null)
Utilidades.Utilidades.EnviaEmailAsync(email.destinatario, Mensagem, email.nome, id_chamado); // DESSA FORMA, A ACTION CONTINUA A EXECUTAR A TAREFA DE MANEIRA NÃO ASSÍNCRONA
}