Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Orleans.AspNetCore.Demo.Grains;
namespace Orleans.AspNetCore.Demo.Controllers
{
public class HomeController : Controller
{
private readonly IClusterClient _clusterClient;
public HomeController(IClusterClient clusterClient)
{
_clusterClient = clusterClient;
}
public async Task<IActionResult> Index()
{
var orderNumberGenerator = _clusterClient.GetGrain<IOrderNumberGenerator>("Demo");
var orderNumber = await orderNumberGenerator.GenerateOrderNumber();
return View(orderNumber);
}
}
}
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.