我正在尝试在Asp.net.core中自定义身份表。是否可以删除表或列,使用我自己的表?我在Google或其他开发人员中找不到任何答案。
ciao,sempui postèscritto in maniera semplice e precisa:
How to add Custom User Properties in Identity Membership System
这是一个小例子:
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
}
}