Created
April 8, 2020 22:53
-
-
Save dcomartin/63992d47e50a379b03267306189194db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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