예제 #1
0
파일: EasyDb.cs 프로젝트: romagny13/EasyDb
        public void SetQueryService(string providerName, IQueryService queryService)
        {
            Guard.IsNullOrEmpty(providerName);
            Guard.IsNull(queryService);

            QueryServiceFactory.RegisterQueryService(providerName, queryService);
            this.queryService = QueryServiceFactory.GetQueryService(providerName);
        }
예제 #2
0
파일: EasyDb.cs 프로젝트: romagny13/EasyDb
        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);
        }