fix
This commit is contained in:
@@ -42,7 +42,7 @@ public class AppDbContext : DbContext
|
||||
public DbSet<MotionGlobal> GlobalMotions { get; set; } = null!;
|
||||
public DbSet<MotionCategory> MotionCategories { get; set; } = null!;
|
||||
public DbSet<MotionAccount> Motions { get; set; } = null!;
|
||||
//public DbSet<AccountMotion> AccountMotions { get; set; } = null!;
|
||||
public DbSet<AccountMotion> AccountMotions { get; set; } = null!;
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ public class AppDbContext : DbContext
|
||||
.WithMany(x => x.Motions)
|
||||
.HasForeignKey(x => x.MotionGlobalId);
|
||||
|
||||
/*modelBuilder.Entity<AccountMotion>()
|
||||
modelBuilder.Entity<AccountMotion>()
|
||||
.HasOne(x => x.Motion)
|
||||
.WithMany(x => x.Motions)
|
||||
.HasForeignKey(x => x.MotionId);
|
||||
@@ -204,6 +204,6 @@ public class AppDbContext : DbContext
|
||||
modelBuilder.Entity<AccountMotion>()
|
||||
.HasOne(x => x.Account)
|
||||
.WithMany(x => x.Motions)
|
||||
.HasForeignKey(x => x.AccountId);*/
|
||||
.HasForeignKey(x => x.AccountId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user