From 3fc676497f4a4b1671e31cc3b8cd3e4c6ac96920 Mon Sep 17 00:00:00 2001 From: transtrike Date: Sat, 19 Dec 2020 14:35:08 +0200 Subject: ALmost solved DP --- src/DevHive.Data/Repositories/DevHiveContext.cs | 35 ------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/DevHive.Data/Repositories/DevHiveContext.cs (limited to 'src/DevHive.Data/Repositories') 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 - { - public DevHiveContext(DbContextOptions options) - : base(options) { } - - public DbSet Technologies { get; set; } - public DbSet Languages { get; set; } - - protected override void OnModelCreating(ModelBuilder builder) - { - builder.Entity() - .HasIndex(x => x.UserName) - .IsUnique(); - - builder.Entity() - .HasMany(x => x.Roles); - - builder.Entity() - .HasMany(x => x.Friends); - - builder.Entity() - .HasIndex(x => x.Id) - .IsUnique(); - - base.OnModelCreating(builder); - } - } -} -- cgit v1.2.3