当我将 Identity 添加到项目时,我已经创建了一个现有的数据库。现在我想向数据库添加更多表,但不知道如何。
我为它创建了一个模型:
public class Match
{
public Guid ID { get; set; }
public string HomeTeam { get; set; }
public string AwayTeam { get; set; }
public int FullTimeScore { get; set; }
public DateTime MatchStart { get; set; }
public int PrizePool { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我的背景:
public class DynamicBettingUserContext : IdentityDbContext<IdentityUser>
{
public DynamicBettingUserContext(DbContextOptions<DynamicBettingUserContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
// Customize the ASP.NET Identity model and override …Run Code Online (Sandbox Code Playgroud)