Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tweaked the database provider code to use the provider as defined in …

…the connection string if one is available. This solved an issue when trying to use a Sql Compact Database 4.0 provider with Massive.
  • Loading branch information...
commit ac6a513d67956767fbcdd524295bde3058f2dd7a 1 parent ab987bf
Ken Burkhardt KennyBu authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 Massive.cs
4 Massive.cs
View
@@ -119,6 +119,10 @@ public class DynamicModel : DynamicObject {
PrimaryKeyField = string.IsNullOrEmpty(primaryKeyField) ? "ID" : primaryKeyField;
DescriptorField = descriptorField;
var _providerName = "System.Data.SqlClient";
+
+ if(ConfigurationManager.ConnectionStrings[connectionStringName].ProviderName != null)
+ _providerName = ConfigurationManager.ConnectionStrings[connectionStringName].ProviderName;
+
_factory = DbProviderFactories.GetFactory(_providerName);
ConnectionString = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString;
}
Please sign in to comment.
Something went wrong with that request. Please try again.