The readme states that
> PostgreSQL: [Npgsql](http://www.npgsql.org/). The Npgsql distribution contains an installer, offered at the 'releases' section. This installer will add the required DbProviderFactory reference and will add the npgsql dll to the gac.
However as per the Npgsql the recommended installation method is from nuget.
How does one get Massive to work with npgsql installed from nuget into the VS project.
Currently my connection string is like so
```
<connectionStrings>
<clear/>
<add name ="test" providerName="Npgsql" connectionString="Host = 127.0.0.1:5432; Username = postgres; Database = abc"/>
</connectionStrings>
```
By i get the following error at line 256 in `Massive.Shared` saying
`System.ArgumentException: 'Unable to find the requested .Net Framework Data Provider. It may not be installed.'`
At this line: https://github.com/FransBouma/Massive/blob/v2.0/src/Massive.Shared.cs#L256
it tries to obtain the DbProviderFactory instance from the DbProviderFactories static class. An ado.net provider from nuget doesn't register itself with that static class so the instance is null.
Add some code there to obtain teh factory directly from the NpgsqlFactory class, using the static `NpgsqlFactory.Instance` and store it in `_factory`.
Hi, solved it some other way
had to add this chunk too into the App.config inside the configuration tag
```
<system.data>
<DbProviderFactories>
<add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>
</DbProviderFactories>
</system.data>
```
I found it mentioned on the Npgsql page under the older unsupported installation methods
> DbProviderFactory in .NET Framework
>
> On .NET Framework, you can register Npgsql's DbProviderFactory in your applications App.Config (or Web.Config), allowing you to use general, provider-independent ADO.NET types in your application (e.g. DbConnection instead of NpgsqlConnection) - [see this tutorial](https://msdn.microsoft.com/en-us/library/dd0w4a2z%28v=vs.110%29.aspx?f=255&MSPPError=-21472173960). To do this, add the following to your App.config:
>
```
> <system.data>
> <DbProviderFactories>
> <add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>
> </DbProviderFactories>
> </system.data>
```
Don't know if its the right way to do it but it worked.
Ah right, that's also a possibility, forgot about that! :) it is the way to register a factory with dbproviderfactories if it's not defined in the machine.config file :)