Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using RazorHtmlEmails.Common;
namespace RazorHtmlEmails.AspNetCore.Pages;
public class IndexModel : PageModel
private readonly IRegisterAccountService _registerAccountService;
public IndexModel(IRegisterAccountService registerAccountService)
_registerAccountService = registerAccountService;
public async Task OnGetAsync()
// In reality, you would have this on a POST and pass along user input and not just have the Confirm Account link be the Index page... but #Demoware
await _registerAccountService.Register("", Url.Page("./Index"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment