aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Repositories
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2020-12-19 14:35:08 +0200
committertranstrike <transtrike@gmail.com>2020-12-19 14:35:08 +0200
commit3fc676497f4a4b1671e31cc3b8cd3e4c6ac96920 (patch)
treed9aa0f986732933d0d5efea630fec9ca26affc8a /src/DevHive.Data/Repositories
parentc8ce9f236f69cd0be2fb156171b53efa62930122 (diff)
downloadDevHive-3fc676497f4a4b1671e31cc3b8cd3e4c6ac96920.tar
DevHive-3fc676497f4a4b1671e31cc3b8cd3e4c6ac96920.tar.gz
DevHive-3fc676497f4a4b1671e31cc3b8cd3e4c6ac96920.zip
ALmost solved DP
Diffstat (limited to 'src/DevHive.Data/Repositories')
-rw-r--r--src/DevHive.Data/Repositories/DevHiveContext.cs35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/DevHive.Data/Repositories/DevHiveContext.cs b/src/DevHive.Data/Repositories/DevHiveContext.cs
deleted file mode 100644
index 7fa8130..0000000
--- a/src/DevHive.Data/Repositories/DevHiveContext.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using DevHive.Data.Models;
-using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore;
-
-namespace DevHive.Data.Repositories
-{
- public class DevHiveContext : IdentityDbContext<User, Role, Guid>
- {
- public DevHiveContext(DbContextOptions options)
- : base(options) { }
-
- public DbSet<Technology> Technologies { get; set; }
- public DbSet<Language> Languages { get; set; }
-
- protected override void OnModelCreating(ModelBuilder builder)
- {
- 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();
-
- base.OnModelCreating(builder);
- }
- }
-}