コード例 #1
0
 public RepositoryWrapper(ThunderRaederDbContext dbContext, IMapper mapper,
                          ReadOnlyDictionary <string,
                                              ExpressionUtil.EmptyConstructorDelegate> configContainer,
                          QueryConfigurationUniversal universalConfig)
 {
     _dbContext       = dbContext;
     _mapper          = mapper;
     _configContainer = configContainer;
     _universalConfig = universalConfig;
 }
コード例 #2
0
        public QueryManager(
            QueryConfigurationBase <TEntity> config,
            QueryConfigurationUniversal universalConfig)
        {
            var instructions = new QueryInstructions <TEntity>(config, universalConfig);

            Querier  = instructions.Querier;
            Orderer  = instructions.Orderer;
            Includer = instructions.Includer();
        }
コード例 #3
0
        public QueryInstructions(
            QueryConfigurationBase <TEntity> config,
            QueryConfigurationUniversal universalConfig)
        {
            Querier          = Handler;
            _includerDetails = config.IncluderDetails;
            _contains        = universalConfig.Methods.Contains;
            _compareTo       = universalConfig.Methods.CompareTo;

            var type  = typeof(QueryInstructions <TEntity>);
            var flags = BindingFlags.NonPublic | BindingFlags.Instance;

            _methodContainer = new Dictionary <string, MethodInfo>
            {
                { QueryMethods.StringContains,
                  type.GetMethod(nameof(CallStringContains), flags) },
                { QueryMethods.DateTimeCompare,
                  type.GetMethod(nameof(CallDateTimeCompare), flags) }
            };
        }