public static void Main(string[] args) { DataProviderFactory dataProviderFactory = new DataProviderFactory(); IDataProvider consoleProvider = dataProviderFactory.CreateDataProvider("ConsoleDataAccess"); consoleProvider.ShowHello("hello World - console"); }
public static CachingProvider Instance() { if (_objProvider == null) { var _objProviderConfig = ProviderConfiguration.GetProviderConfiguration("caching"); var _objProviderInfo = (ProviderBase)_objProviderConfig.Providers[_objProviderConfig.DefaultProvider]; _objProvider = (CachingProvider)DataProviderFactory.CreateDataProvider(_objProviderInfo); } return(_objProvider); }
public void MainTest() { DataProviderFactory dataProviderFactory = new DataProviderFactory(); IDataProvider consoleProvider = dataProviderFactory.CreateDataProvider("ConsoleDataAccess"); consoleProvider.ShowHello("hello world console"); Assert.IsTrue(consoleProvider.Response == "hello world console"); }
public VehicleWCFService() { dataProvider = DataProviderFactory.CreateDataProvider(ConfigurationManager.AppSettings["DataProviderType"]); }
public ManageContact() { DataProviderFactory dataProviderFactory = new DataProviderFactory(); _dataProvider = dataProviderFactory.CreateDataProvider(); }