Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
    
Hi Joseph, I'll try to help you out if I can. Do you get the Entity Data Model wizard? What do you get if you choose New Connection? That's where you will want to configure the postgresql database connection. Also, I did see this link that may be very promising: wekeroad.com/2014/02/05/… –  Andrew Wolfe Aug 5 at 2:25
    
I followed that tutorial and added all the bits into Visual Studio via NuGet, however I do not understand the migration stuff, is that tutorial for migrating an existing project? Also, in the new connection window I am seeing nothing about PostgreSQL, but rather options with regards to Microsoft SQL server. –  Joseph Aug 5 at 6:48
    
Can you post a screen shot? You may need to open 'options' or 'customize' to register the Postgres driver –  Andrew Wolfe Aug 5 at 14:51
    
img1 and img2 –  Joseph Aug 5 at 16:02
2  
Bounty has been awarded. Time to close this question as off-topic or migrate it to SO. It's purely a developer question, nothing DBA about this. –  Colin 't Hart Aug 12 at 10:19

2 Answers 2

up vote 2 down vote accepted
+100

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.

share|improve this answer

you can follow the tutorial in this link in-order to use PostgreSQL under C# and .net framework http://www.codeproject.com/Articles/30989/Using-PostgreSQL-in-your-C-NET-application-An-intr

for managing the database side you can use aquafold (in my opinion one of the best database management for PostgreSQL check the following link http://www.aquafold.com/), PGAdmin http://www.pgadmin.org/ or EMS http://www.sqlmanager.net/ . those database management program will help you a lot if you want to make the management of the database using GUI (easier to use than terminal screen)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.