aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data
diff options
context:
space:
mode:
Diffstat (limited to 'src/DevHive.Data')
-rw-r--r--src/DevHive.Data/DevHiveContext.cs9
-rw-r--r--src/DevHive.Data/Repositories/UserRepository.cs12
2 files changed, 9 insertions, 12 deletions
diff --git a/src/DevHive.Data/DevHiveContext.cs b/src/DevHive.Data/DevHiveContext.cs
index c1bda49..17e16e7 100644
--- a/src/DevHive.Data/DevHiveContext.cs
+++ b/src/DevHive.Data/DevHiveContext.cs
@@ -27,6 +27,15 @@ namespace DevHive.Data
builder.Entity<User>()
.HasMany(x => x.Friends);
+ builder.Entity<User>()
+ .HasMany(x => x.Languages);
+
+ builder.Entity<User>()
+ .HasMany(x => x.Technologies);
+
+ builder.Entity<User>()
+ .HasChangeTrackingStrategy(ChangeTrackingStrategy.Snapshot);
+
base.OnModelCreating(builder);
}
}
diff --git a/src/DevHive.Data/Repositories/UserRepository.cs b/src/DevHive.Data/Repositories/UserRepository.cs
index 6d4a175..06bafca 100644
--- a/src/DevHive.Data/Repositories/UserRepository.cs
+++ b/src/DevHive.Data/Repositories/UserRepository.cs
@@ -49,18 +49,6 @@ namespace DevHive.Data.Repositories
}
#endregion
- #region Update
- public override async Task<bool> EditAsync(Guid id, User newEntity)
- {
- User user = await GetByIdAsync(id);
-
- this._context.Update(user);
- user = newEntity;
-
- return await this.SaveChangesAsync(this._context);
- }
- #endregion
-
#region Validations
public async Task<bool> DoesUserExistAsync(Guid id)
{