public BaseService(ILoggerFactory loggerFactory, ITenant tenant) { this.logger = loggerFactory.CreateLogger <T>(); this.tenant = tenant; this.db = this.tenant.MasterDatabase; this.user = this.tenant.Context.User; }
public BaseService(ILoggerFactory loggerFactory, ITenant tenant, IPrincipal user) { this.logger = loggerFactory.CreateLogger <T>(); this.tenant = tenant; this.db = SystemDatabase.GetDatabase(tenant.Site.ProviderName, tenant.Site.ConnectionString, tenant.Site.DatabaseName); this.user = user; }
public ApiController(ILoggerFactory loggerFactory, ITenant tenant) : base(loggerFactory, tenant) { this.repository = SystemDatabase.GetDatabase(tenant.Site.ProviderName, tenant.Site.ConnectionString, tenant.Site.DatabaseName); this.db = this.repository.Entity <E>(); }
public SiteService(ILoggerFactory loggerFactory, ITenant tenant, IPrincipal user) { this.logger = loggerFactory.CreateLogger <SiteService>(); this.db = SystemDatabase.GetDatabase(); this.user = user; }
public UserService(ILoggerFactory loggerFactory) { this.db = SystemDatabase.GetDatabase(); this.logger = loggerFactory.CreateLogger <UserService>(); }