示例#1
0
 public BaseWebAPIFinder(IReadOnlyCollection <TenantModel> tenants)
 {
     _headerMapper = new WebAPIDtoMapper <THeader>();
     _mapper       = new WebAPIDtoMapper <T>();
     //_tenant = CloneTenantModel(tenants.Single(f => f.CurrentTenant)); dosn't work
     _tenant         = CloneTenantModel(tenants.First());
     _customAuthFunc = null;
     ResetDecoration();
     EnablePaging   = true;
     EnableTopOdata = true;
 }
示例#2
0
 public FacadeWebAPIBase(ICollection <WebAPITenantConfiguration <T, TDao> > daoConfigurations, Tenant currentTenant)
 {
     _mapper            = new WebAPIDtoMapper <T>();
     _daoConfigurations = daoConfigurations.Where(f => f.Tenant.CurrentTenant || (!f.Tenant.CurrentTenant && f.Tenant.Entities.Any(x => x.Key == typeof(T).Name && x.Value.IsActive))).ToList();
     _currentTenant     = currentTenant;
 }
示例#3
0
 public RoleUserFacade(ICollection <TenantModel> model, Tenant currentTenant)
     : base(model.Select(s => new WebAPITenantConfiguration <RoleUser, RoleUserDao>(s)).ToList(), currentTenant)
 {
     this._mapper = new WebAPIDtoMapper <RoleUser>();
 }
示例#4
0
 public WorkflowPropertyFacade(ICollection <TenantModel> model, Tenant currentTenant)
     : base(model.Select(s => new WebAPITenantConfiguration <WorkflowProperty, WorkflowPropertyDao>(s)).ToList(), currentTenant)
 {
     this._mapper = new WebAPIDtoMapper <WorkflowProperty>();
 }