Skip to content

Instantly share code, notes, and snippets.

@sandrinodimattia
Created July 22, 2012 19:38
Show Gist options
  • Select an option

  • Save sandrinodimattia/3160835 to your computer and use it in GitHub Desktop.

Select an option

Save sandrinodimattia/3160835 to your computer and use it in GitHub Desktop.
Using the DbProviderFactoryRepository
// 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