Remove DbConfig and new constructors on DbContextBase and refactor Migrations to use explcit generation of IOqtaneDatabase instance

This commit is contained in:
Charles Nurse
2021-05-12 15:17:40 -07:00
parent c958f90ee2
commit c036a9d11f
34 changed files with 137 additions and 225 deletions

View File

@ -1,9 +1,29 @@
using System;
using Oqtane.Interfaces;
namespace Oqtane.Shared
{
public class InstallConfig
{
private IOqtaneDatabase _database;
public string ConnectionString { get; set; }
public string DatabaseType { get; set; }
public IOqtaneDatabase Database
{
get
{
if (_database == null)
{
var type = Type.GetType(DatabaseType);
_database = Activator.CreateInstance(type) as IOqtaneDatabase;
}
return _database;
}
}
public string Aliases { get; set; }
public string TenantName { get; set; }
public bool IsNewTenant { get; set; }