Last active
January 1, 2022 01:28
Star
You must be signed in to star a gist
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 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("testmctestyface@contoso.com", Url.Page("./Index")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment