我正在开发一个 ASP .NET 核心 Web 应用程序。我在应用程序中使用Identity UI 框架进行用户注册和授权。我将 Identity User 继承给我的ApplicationUser班级,如下所示。它创建了一个名为 as 的表ApplicationUser并成功保存了给定属性下的相关数据:(我正在使用Microsoft SQL数据库)
应用程序用户.cs
using Microsoft.AspNetCore.Identity;
using System;
using System.Collections.Generic;
#nullable disable
namespace WebApp.Models
{
public partial class ApplicationUser : IdentityUser<int>
{
public ApplicationUser()
{
}
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string LastNam { get; set; }
public DateTime? DateOfBirth { get; set; }
public string Bio { get; set; } …Run Code Online (Sandbox Code Playgroud)