Using dirty read
DRDataService
- service data, the heir SQLDataService, has the same functionality as conventional MSSQLDataService, but when reading data “dirty read (dirty read)”.
receiving a copy DRDataService
Instance DRDataService can be obtained through UnityFactory using the following code:
IUnityContainer container = UnityFactory.CreateContainer();
IDataService dataService = container.Resolve<IDataService>("DRDataService");
dataService.CustomizationString = DataServiceProvider.DataService.CustomizationString;
Configure DataService
Setting DRDataService
via the configuration file :
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration"/>
</configSections>
<unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
<container>
<register name="DRDataService" type="ICSSoft.STORMNET.Business.IDataService, ICSSoft.STORMNET.Business" mapTo="ICSSoft.STORMNET.Business.DRDataService, ICSSoft.STORMNET.Business.DRDataService">
<constructor/>
</register>
</container>
</unity>
</configuration>
The connection string in this example is configured as described in the article about DataServiceProvider