diff options
| author | transtrike <transtrike@gmail.com> | 2021-03-25 12:22:54 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-03-25 12:22:54 +0200 |
| commit | d53caaea6094136bac3d01ce9dd2782bb1819fe2 (patch) | |
| tree | 0c15e12d9a694600a51070295b0358cee1463545 /src/Data/DevHive.Data/DevHiveContext.cs | |
| parent | 9b04b4f2b031a3c631dba65908f277996015ae05 (diff) | |
| download | DevHive-d53caaea6094136bac3d01ce9dd2782bb1819fe2.tar DevHive-d53caaea6094136bac3d01ce9dd2782bb1819fe2.tar.gz DevHive-d53caaea6094136bac3d01ce9dd2782bb1819fe2.zip | |
Profile Picture implemented; Tests and Front end work await
Diffstat (limited to 'src/Data/DevHive.Data/DevHiveContext.cs')
| -rw-r--r-- | src/Data/DevHive.Data/DevHiveContext.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Data/DevHive.Data/DevHiveContext.cs b/src/Data/DevHive.Data/DevHiveContext.cs index b0bbdc6..c3adf2d 100644 --- a/src/Data/DevHive.Data/DevHiveContext.cs +++ b/src/Data/DevHive.Data/DevHiveContext.cs @@ -17,6 +17,7 @@ namespace DevHive.Data public DbSet<PostAttachments> PostAttachments { get; set; } public DbSet<Comment> Comments { get; set; } public DbSet<Rating> Rating { get; set; } + public DbSet<ProfilePicture> ProfilePicture { get; set; } public DbSet<RatedPost> RatedPost { get; set; } public DbSet<UserRate> UserRate { get; set; } @@ -28,9 +29,7 @@ namespace DevHive.Data .IsUnique(); builder.Entity<User>() - .HasOne(x => x.ProfilePicture) - .WithOne(x => x.User) - .HasForeignKey<ProfilePicture>(x => x.UserId); + .HasOne(x => x.ProfilePicture); /* Roles */ builder.Entity<User>() |
