PostgreSQL – Connecting with Entity Framework via Npgsql and C#

centity-frameworknpgsqlpostgresql

So, I'm new to databases and only have done a little with PostgreSQL before. I have C# (visual studio 2012) and have downloaded the Entity framework (6). I have also downloaded the latest Npgsql data connection driver and used this tutorial:

Using Entity Framework 6 with Npgsql 2.1.0

Now I have of course installed PostgreSQL and referenced the two dll's in my C# project:

npgsql.dll and npgsql.entityframework.dll

Now I need to know how to add, view, delete stuff via C# but I can't find any material on using C#, Npgsql and Entity Framework together.

With no material on using Npqsql and Entity Framework 6, I have instead found this tutorial for version 5:

Create Entity Data Model in Entity Framework 5.0

However, under choose your data connection, when I add a new connection, there is no option to use Npqsql. I really am confused and have been trying to control PostgreSQL via C# for about a week now, I have tried almost every link I can find on Google and am close to giving up. A lot of tutorials show how to drive PostgreSQL directly via Npgsql without using Entity Framework, but I really wanted to use the Entity Framework because I've been told it makes manipulating the database much easier.

Best Answer

I recommend not using Entity Framework with anything else other than SQLSERVER. And then LINQ to SQL may be better. lightspeed was recommended to me as a better product. I personally have not used it.