Exemple #1
0
 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;
 }
Exemple #2
0
 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;
 }
Exemple #3
0
 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>();
 }
Exemple #4
0
 public SiteService(ILoggerFactory loggerFactory, ITenant tenant, IPrincipal user)
 {
     this.logger = loggerFactory.CreateLogger <SiteService>();
     this.db     = SystemDatabase.GetDatabase();
     this.user   = user;
 }
Exemple #5
0
 public UserService(ILoggerFactory loggerFactory)
 {
     this.db     = SystemDatabase.GetDatabase();
     this.logger = loggerFactory.CreateLogger <UserService>();
 }