aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Repositories/DevHiveContext.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DevHive.Data/Repositories/DevHiveContext.cs')
-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);
- }
- }
-}