Created
July 22, 2012 19:38
-
-
Save sandrinodimattia/3160835 to your computer and use it in GitHub Desktop.
Using the DbProviderFactoryRepository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Initialize the repository. | |
| var repository = new DbProviderFactoryRepository(); | |
| // Create a description manually and add it to the repository. | |
| var manualDescription = new DbProviderFactoryDescription(); | |
| manualDescription.Description = ".NET Framework Data Provider for Microsoft SQL Server Compact"; | |
| manualDescription.Invariant = "System.Data.SqlServerCe.3.5"; | |
| manualDescription.Name = "Microsoft SQL Server Compact Data Provider"; | |
| manualDescription.Type = "System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe"; | |
| repository.Add(manualDescription); | |
| // Use the default SqlCe35 provider. | |
| repository.Add(new SqlCe35ProviderFactoryDescription()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment