This commit is contained in:
2023-06-21 17:55:53 +03:00
parent 5e0965cfd1
commit fa8852a32a
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -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);
}
}