Tag Archive: Entity Framework

EFCodeFirst and providerInvariantName

If you don’t include the provider name in the connection string EF will throw an exception with the message: “Expecting non-empty string for ‘providerInvariantName’ parameter.”   FIX: Add:  providerName=”System.Data.SqlClient”  to your connection string….or whatever provider you are using. Wrong: <add name=”NameOfConnection” connectionString=”your_connection_string”/> Correct: <add name=”NameOfConnection” providerName=”System.Data.SqlClient” connectionString=”your_connection_string”/>   Thought: Seems really odd that EF does […]

Continue Reading