Install Wizard

This commit is contained in:
Shaun Walker
2019-07-18 13:11:31 -04:00
parent af70f0a956
commit 1c0d2de9fe
36 changed files with 580 additions and 218 deletions

View File

@ -9,10 +9,10 @@ namespace Oqtane.Repository
{
public class AliasRepository : IAliasRepository
{
private HostContext db;
private MasterContext db;
private readonly IMemoryCache _cache;
public AliasRepository(HostContext context, IMemoryCache cache)
public AliasRepository(MasterContext context, IMemoryCache cache)
{
db = context;
_cache = cache;

View File

@ -3,9 +3,9 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
public class HostContext : DbContext
public class MasterContext : DbContext
{
public HostContext(DbContextOptions<HostContext> options) : base(options) { }
public MasterContext(DbContextOptions<MasterContext> options) : base(options) { }
public virtual DbSet<Alias> Alias { get; set; }
public virtual DbSet<Tenant> Tenant { get; set; }

View File

@ -10,10 +10,10 @@ namespace Oqtane.Repository
{
public class TenantRepository : ITenantRepository
{
private HostContext db;
private MasterContext db;
private readonly IMemoryCache _cache;
public TenantRepository(HostContext context, IMemoryCache cache)
public TenantRepository(MasterContext context, IMemoryCache cache)
{
db = context;
_cache = cache;

View File

@ -1,20 +1,18 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Oqtane.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Caching.Memory;
namespace Oqtane.Repository
{
public class TenantResolver : ITenantResolver
{
private HostContext db;
private MasterContext db;
private readonly string aliasname;
private readonly IAliasRepository _aliasrepository;
private readonly ITenantRepository _tenantrepository;
public TenantResolver(HostContext context, IHttpContextAccessor accessor, IAliasRepository aliasrepository, ITenantRepository tenantrepository)
public TenantResolver(MasterContext context, IHttpContextAccessor accessor, IAliasRepository aliasrepository, ITenantRepository tenantrepository)
{
db = context;
_aliasrepository = aliasrepository;