1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-13 08:38:19 -05:00

migrated to ASP.Net Core

This commit is contained in:
RaidMax
2018-02-21 19:29:23 -06:00
parent 2e0b5f2d71
commit 761ab8a114
4407 changed files with 311698 additions and 124726 deletions

View File

@ -8,9 +8,12 @@ using SharedLibrary.Database.Models;
using System.Data.SqlServerCe;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Reflection;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.SqlServerCompact;
namespace SharedLibrary.Database
{
public class DatabaseContext : DbContext
{
public DbSet<EFClient> Clients { get; set; }
@ -47,7 +50,7 @@ namespace SharedLibrary.Database
modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
// https://aleemkhan.wordpress.com/2013/02/28/dynamically-adding-dbset-properties-in-dbcontext-for-entity-framework-code-first/
foreach (string dllPath in System.IO.Directory.GetFiles($"{Environment.CurrentDirectory}{System.IO.Path.DirectorySeparatorChar}Plugins"))
foreach (string dllPath in System.IO.Directory.GetFiles($"{Utilities.OperatingDirectory}Plugins"))
{
Assembly library;
try