Пример #1
0
        public void SetQueryService(string providerName, IQueryService queryService)
        {
            Guard.IsNullOrEmpty(providerName);
            Guard.IsNull(queryService);

            QueryServiceFactory.RegisterQueryService(providerName, queryService);
            this.queryService = QueryServiceFactory.GetQueryService(providerName);
        }
Пример #2
0
        public void SetConnectionStringSettings(string connectionString, string providerName,
                                                ConnectionStrategy connectionStrategy = ConnectionStrategy.Auto)
        {
            Guard.IsNullOrEmpty(connectionString);
            Guard.IsNullOrEmpty(providerName);

            this.WrappedConnection = new ConnectionWrapper(connectionString, providerName, connectionStrategy);
            this.queryService      = QueryServiceFactory.GetQueryService(providerName);
        }