[CHANGE] Fixed storing account/channel
This commit is contained in:
@@ -55,8 +55,9 @@ public sealed class LibraryDbContext : DbContext
|
||||
.WithOne()
|
||||
.HasForeignKey(x => x.ChannelId);
|
||||
channel.HasOne(x => x.ClientAccount)
|
||||
.WithOne()
|
||||
.HasForeignKey<ClientAccountEntity>(e => e.Id);
|
||||
.WithOne(x => x.Channel)
|
||||
.HasForeignKey<ClientAccountEntity>(e => e.Id)
|
||||
.IsRequired(false);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ClientAccountEntity>(cae =>
|
||||
@@ -66,6 +67,10 @@ public sealed class LibraryDbContext : DbContext
|
||||
cae.HasMany(x => x.HttpCookies)
|
||||
.WithOne()
|
||||
.HasForeignKey(x => x.ClientId);
|
||||
cae.HasOne(x => x.Channel)
|
||||
.WithOne(ca => ca.ClientAccount)
|
||||
.HasForeignKey<ChannelEntity>(ce => ce.Id)
|
||||
.IsRequired(false);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<HttpCookieEntity>(httpce =>
|
||||
|
||||
Reference in New Issue
Block a user