From 98e17766b203734a1817eed94338e2d25f4395f7 Mon Sep 17 00:00:00 2001 From: transtrike Date: Sat, 13 Feb 2021 16:20:18 +0200 Subject: Project Restructure P.1 --- src/DevHive.Data/DevHiveContextFactory.cs | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/DevHive.Data/DevHiveContextFactory.cs (limited to 'src/DevHive.Data/DevHiveContextFactory.cs') diff --git a/src/DevHive.Data/DevHiveContextFactory.cs b/src/DevHive.Data/DevHiveContextFactory.cs deleted file mode 100644 index f4849d7..0000000 --- a/src/DevHive.Data/DevHiveContextFactory.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Configuration; -using System.IO; - -namespace DevHive.Data -{ - public class DevHiveContextFactory : IDesignTimeDbContextFactory - { - public DevHiveContext CreateDbContext(string[] args) - { - var configuration = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("ConnectionString.json") - .Build(); - - var optionsBuilder = new DbContextOptionsBuilder() - .UseNpgsql(configuration.GetConnectionString("DEV")); - - return new DevHiveContext(optionsBuilder.Options); - } - } -} \ No newline at end of file -- cgit v1.2.3