Skip to content

Instantly share code, notes, and snippets.

@dcomartin dcomartin/queue.cs

Created Apr 8, 2020
Embed
What would you like to do?
using Coravel.Queuing.Interfaces;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopWeb.Web.Features;
using Microsoft.eShopWeb.Web.ViewModels.Manage;
namespace Microsoft.eShopWeb.Web.Controllers
{
[Route("[controller]/[action]")]
public class DemoController : Controller
{
private readonly IQueue _queue;
public DemoController(IQueue queue)
{
_queue = queue;
}
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult SendVerificationEmail(IndexViewModel model)
{
_queue.QueueInvocableWithPayload<DemoInvocable, string>("This is my data/parameter for my Invocable that will be put into the Payload property.");
return RedirectToAction("Index", "Manage");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.