aboutsummaryrefslogtreecommitdiff
path: root/src/Data/DevHive.Data/DevHiveContext.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/DevHive.Data/DevHiveContext.cs')
-rw-r--r--src/Data/DevHive.Data/DevHiveContext.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Data/DevHive.Data/DevHiveContext.cs b/src/Data/DevHive.Data/DevHiveContext.cs
index 621336f..f8574a4 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; }
protected override void OnModelCreating(ModelBuilder builder)
{
@@ -26,9 +27,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>()