You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Projet_Blazor/src/CraftSharp/Pages/Inscription.razor.cs

31 lines
814 B

using Microsoft.Extensions.Logging;
using System;
using System.ComponentModel.DataAnnotations;
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Components;
using CraftSharp.Models;
using CraftSharp.Services;
namespace CraftSharp.Pages
{
public partial class Inscription
{
[Inject]
public CustomStateProvider AuthStateProvider { get; set; }
[Inject]
public NavigationManager NavigationManager { get; set; }
private string error { get; set; }
private InscriptionModel registerRequest { get; set; } = new InscriptionModel();
private async Task OnSubmit()
{
await AuthStateProvider.Register(registerRequest);
NavigationManager.NavigateTo("");
}
}
}