小编Geo*_*dal的帖子

将 ASP.NET 核心标识用户属性保存在另一个表中

我正在开发一个 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)

sql-server asp.net-mvc asp.net-identity asp.net-core-mvc

7
推荐指数
0
解决办法
67
查看次数