diff options
| author | transtrike <transtrike@gmail.com> | 2020-12-17 19:13:01 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2020-12-17 19:13:01 +0200 |
| commit | 94a3b0661106e91ab3a1a523af3c60df131a4f63 (patch) | |
| tree | d186fe6d0ea18bdefd8e37f83a754d155f4598d2 /src/DevHive.Data/Repositories/DevHiveContext.cs | |
| parent | f4515fc3ff5fc222a3bdd40c5d4113f9bd79106f (diff) | |
| download | DevHive-94a3b0661106e91ab3a1a523af3c60df131a4f63.tar DevHive-94a3b0661106e91ab3a1a523af3c60df131a4f63.tar.gz DevHive-94a3b0661106e91ab3a1a523af3c60df131a4f63.zip | |
Friends implementation added. UserController/AddAFriend added
Diffstat (limited to 'src/DevHive.Data/Repositories/DevHiveContext.cs')
| -rw-r--r-- | src/DevHive.Data/Repositories/DevHiveContext.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/DevHive.Data/Repositories/DevHiveContext.cs b/src/DevHive.Data/Repositories/DevHiveContext.cs index 373eb5e..7fa8130 100644 --- a/src/DevHive.Data/Repositories/DevHiveContext.cs +++ b/src/DevHive.Data/Repositories/DevHiveContext.cs @@ -18,7 +18,13 @@ namespace DevHive.Data.Repositories builder.Entity<User>() .HasIndex(x => x.UserName) .IsUnique(); - + + builder.Entity<User>() + .HasMany(x => x.Roles); + + builder.Entity<User>() + .HasMany(x => x.Friends); + builder.Entity<Role>() .HasIndex(x => x.Id) .IsUnique(); |
