Asp.Net.Core完全自定义
我正在尝试在Asp.net.core中自定义标识表。是否可以删除表或列,使用我自己的表?我在谷歌或其他开发者那里找不到任何答案。请关注这篇文章,它是用一种简单而精确的方式写的: 这是一个小例子:Asp.Net.Core完全自定义,asp.net,asp.net-core,.net-core,asp.net-core-identity,Asp.net,Asp.net Core,.net Core,Asp.net Core Identity,我正在尝试在Asp.net.core中自定义标识表。是否可以删除表或列,使用我自己的表?我在谷歌或其他开发者那里找不到任何答案。请关注这篇文章,它是用一种简单而精确的方式写的: 这是一个小例子: using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; using Mic
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
namespace Identity.Models
{
public class AppUser : IdentityUser
{
public Country Country { get; set; }
public int Age { get; set; }
[Required]
public string Salary { get; set; }
}
public enum Country
{
USA, UK, France, Germany, Russia
}
}
这是可能的。在Documentation中,如果我可以删除表中的列,则不会写入,例如,我可以继承自定义模型的IdentityUser类,但不能删除IdentityUser表本身的列。