0

There's not much documentation around - all of which do not answer the above question to total n00bs:

How to install Npgsql as a data provider for ADO.NET Entity Framework? --> unfortunately nobody could provide an answer. And see here: Using npgsql with EF6 in asp.net 5 - doesn't provide any answers either. Moreover, for some reason the Npgsql wiki links don't work - so there's no ready access to documentation.

My current method of installing Npgsql (so that I can use entity framework 6.0) is by: going here: https://www.nuget.org/packages/EntityFramework6.Npgsql/ and installing: "Install-Package EntityFramework6.Npgsql" in the package manager console (in visual studio). I don't do anything else.

  1. Am I doing this right?
  2. How exactly does one install npgsql so one can use entity framework 6.0? Noob friendly advice much appreciated.

regards, BK

1
  • The developer of npgsql frequents SO, hopefully he'll stop by and help you out. Commented Nov 17, 2016 at 11:46

1 Answer 1

1

The installation should be as simple as installing the nuget packages, that's why there is no "instruction". Nuget should take care of everything.

Unfortunately it looks like the "EntityFramework6.Npgsql" nuget package in the current version has incorrectly defined dependencies. It lists "Npgsql (>= 3.1.0)" as a dependency but it actually requires Npgsql in version 3.1.2 or higher.

Nuget defaults to downloading the lowest required version of a dependency. So if all you did was the command "Install-Package EntityFramework6.Npgsql" then your project won't work. (I guess this is why you asked another question).

Personally I think it is a good practice to install all the dependencies in their latest versions. Npgsql 3.1.8 is out already so why not use it? They probably fixed a lot of bugs.

I was experimenting with Npgsql yesterday but I did not run into your problem because I installed all the required packages in their latest versions right from the start.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.