예제 #1
0
 public LookupService(IGroupDataContext dataContext, ISystemDataContext systemDataContext,
                      RequestContext requestContext, IGroupDataContextFactory groupDataContextFactory)
 {
     _dataContext             = dataContext;
     _systemDataContext       = systemDataContext;
     _requestContext          = requestContext;
     _groupDataContextFactory = groupDataContextFactory;
 }
예제 #2
0
        private async Task <ConfigurationSetting> GetConfigurationSettingAsync(string key, string groupId, string culture, string section)
        {
            IGroupDataContext dataContext = _groupDataContextFactory.CreateGroupDataContext(groupId);

            var config = await dataContext.FirstOrDefaultAsync <ConfigurationSetting, ConfigurationSetting>(q =>
                                                                                                            q.Where(c =>
                                                                                                                    (c.Culture == culture || c.Culture == "*") &&
                                                                                                                    (c.Section == section || c.Section == "*") &&
                                                                                                                    c.Key == key)
                                                                                                            .OrderBy(c => c.Priority));

            return(config);
        }
        private async Task <LocalisationText> GetLocalisationTextAsync(string key, string groupId, string culture, string section)
        {
            IGroupDataContext dataContext = _groupDataContextFactory.CreateGroupDataContext(groupId);

            var text = await dataContext.FirstOrDefaultAsync <LocalisationText, LocalisationText>(q =>
                                                                                                  q.Where(c =>
                                                                                                          (c.Culture == culture || c.Culture == "*") &&
                                                                                                          (c.Section == section || c.Section == "*") &&
                                                                                                          c.Key == key)
                                                                                                  .OrderBy(c => c.Priority));

            return(text);
        }
예제 #4
0
        private async Task <AlertTemplate> GetTemplateAsync(string key, string groupId, string culture, string channel)
        {
            IGroupDataContext dataContext = _groupDataContextFactory.CreateGroupDataContext(groupId);

            var text = await dataContext.FirstOrDefaultAsync <AlertTemplate, AlertTemplate>(q =>
                                                                                            q.Where(c =>
                                                                                                    (c.Culture == culture || c.Culture == "*") &&
                                                                                                    c.Section == "*" &&
                                                                                                    c.Key == key &&
                                                                                                    c.Channel == channel)
                                                                                            .OrderBy(c => c.Priority));

            return(text);
        }
예제 #5
0
 public ConfigurationService(IGroupDataContextFactory groupDataContextFactory, IGroupDataContext dataContext)
 {
     _groupDataContextFactory = groupDataContextFactory;
     _dataContext             = dataContext;
 }
예제 #6
0
 public ContractorRepository(IGroupDataContext groupDataContext)
 {
     _context = groupDataContext;
 }
예제 #7
0
 public PermissionService(IGroupDataContext dataContext, IPlatformServiceBusService platformServiceBusService, ILookupService lookupService)
 {
     _dataContext = dataContext;
     _platformServiceBusService = platformServiceBusService;
     _lookupService             = lookupService;
 }
예제 #8
0
 public SupervisorRepository(IGroupDataContext groupDataContext)
 {
     _context = groupDataContext;
 }
예제 #9
0
 public PageBase()
 {
     _context = new GroupDbContext();
     _auditor = new Auditor();
     _uow     = new UnitOfWork(_context, _auditor);
 }
예제 #10
0
 public RiskAssessorRepository(IGroupDataContext groupDataContext)
 {
     _context = groupDataContext;
 }
예제 #11
0
 public PlatformNormalisationService(ISystemDataContext systemDataContext, IGroupDataContext groupDataContext)
 {
     _systemDataContext = systemDataContext;
     _groupDataContext  = groupDataContext;
 }
예제 #12
0
 public LocalisationService(IGroupDataContext dataContext, RequestContext requestContext)
 {
     _dataContext    = dataContext;
     _requestContext = requestContext;
 }
예제 #13
0
 public UnitOfWork(IGroupDataContext groupDataContext, IAuditor auditor)
 {
     PersistenceContexts = new IPersistenceContext[] { groupDataContext };
     Auditor             = auditor;
 }
예제 #14
0
 public TPRepository(IGroupDataContext groupDataContext)
 {
     _context = groupDataContext;
 }
예제 #15
0
 public InstructorRepository(IGroupDataContext groupDataContext)
 {
     _context = groupDataContext;
 }
예제 #16
0
 public AlertTemplateService(IGroupDataContext dataContext)
 {
     _dataContext = dataContext;
 }