11

The comment here says I can use LightSpeed, which I've downloaded and installed. Then I get to this screen:

And I'm not sure what to do. I'm not too familiar with connection strings, first of all. I found this, but... I think "Model assembly" and "Unit of work class" are required. I don't have any DLL's and I'm not working with LightSpeed models, so I'm not sure this is even useful.

The IQ addon Driver works great with my MySQL database. Really easy to set up and use. Are there any drivers that work with PostgreSQL yet? Looks like you can add them by choosing an "*.lpx" file.

mpen
  • 272,448
  • 266
  • 850
  • 1,236
  • Maybe better chances at superuser.SE? – Erwin Brandstetter Nov 05 '11 at 05:45
  • @ErwinBrandstetter: Maybe. Linq and SQL are programming languages...thought I'd ask here first. Feel free to vote for migration :) Here... I'll vote too! – mpen Nov 05 '11 at 05:58
  • Your question is just fine. Well put, research effort and everything. I'm thinking loud, what might help you. The feature to suggest a migration is called "close" unfortunately. I'd rather name that differently, but that's what we have to work with ... – Erwin Brandstetter Nov 05 '11 at 06:07
  • In the meantime, I'm having fun querying StackOverflow data :D http://data.stackexchange.com/stackoverflow/atom – mpen Nov 05 '11 at 06:11

2 Answers2

7

I've developed a dynamic LINQPad driver for PostgreSQL databases. Using it you can query the database without the necessity to define your model first (similar to the IQ or the built in LINQ to SQL driver).

You can find it on GitHub:

https://github.com/fknx/linqpad-postgresql-driver

fknx
  • 1,775
  • 13
  • 19
  • 1
    It doesnt work, when I used it to connect, I get argument cannot be null. Please give some examples to show that it works before publicity! – loneshark99 Jan 26 '17 at 22:58
  • @loneshark99 Please take a look at [issue #4](https://github.com/fknx/linqpad-postgresql-driver/issues/4). If this doesn't solve the problem please report it on [GitHub](https://github.com/fknx/linqpad-postgresql-driver). Thanks! – fknx Jan 30 '17 at 11:12
5

The LightSpeed driver is a static driver, meaning that you must first create a model (and hence a typed DataContext) using the LightSpeed tools.

If you just want to query PostgreSQL in LINQ, you need a dynamic LINQPad driver which no-one has written has yet, AFAIK.

Joe Albahari
  • 30,118
  • 7
  • 80
  • 91
  • 1
    Looks like dotConnect can do it http://www.devart.com/dotconnect/ but the built-in query runner kept crashing when I tried to use it... parsed out all the models fine, but can't seem to query it. – mpen Nov 07 '11 at 04:38