LightSpeed and LINQPad: the perfect partners

LINQPad is a justly popular tool for trying out LINQ queries — it’s a great way to quickly check how a query will behave or just to check what’s in your database. (Actually, it’s a great way to test quick code snippets whether LINQy or otherwise.) LINQPad version 2 has just shipped, and in addition to the familiar LINQ to SQL support, it allows you to plug in other LINQ providers — such as LightSpeed.

We’re pleased to announce the immediate availability of a LightSpeed driver for LINQPad. This means you’ll be able to test LightSpeed queries using your LightSpeed domain model with all the speed and convenience of LINQPad.

And of course, because the driver uses LightSpeed, you’ll be able to use all the facilities of LightSpeed — for example, to perform Lucene-based full-text search from within LINQPad, or to include or exclude soft-deleted entities from the query.

To get the LightSpeed driver, just go into LINQPad, click Add Connection in the data sources list, choose View more drivers…, and choose the LightSpeed driver from the list. LINQPad will automatically download and install it. Once this is done, you’ll see LightSpeed in the Add Connection dialog. Select LightSpeed and click Next.

Now all you need to do is configure the connection with details of your database and the assembly containing your LightSpeed model. You’ll need to tell LINQPad the following details:

  • What kind of database you’re talking to (SQLite, MySQL, SQL Server, etc.)
  • The connection string for the database
  • The assembly containing the LightSpeed model (your compiled EXE or DLL)
  • The strong-typed unit of work class in that assembly (don’t forget the namespace!)

To save time, you can also use the Infer from Model button to extract this configuration information from your .lsmodel file. (You’ll still need to have built the DLL or EXE though.)

You can also set up LightSpeed context properties such as whether table names in the database are pluralised and whether to quote identifiers in queries. If you’re planning to use LINQPad to do ad hoc inserts and updates, you can also specify the identity method and timestamp strategy.

That’s it! You’re ready to get querying!

(If you have any trouble with the automatic download of the LightSpeed driver, you can instead download it directly from Mindscape here and install it using the Browse button on the “Choose a Driver” screen.)

You can get LINQPad here. And if you don’t already have LightSpeed, you can get the free Express edition here. And if there are any more features you’d like to see in the driver, let us know in the LightSpeed forum!

kick it on DotNetKicks.com

Tagged as LightSpeed, Products

7 Responses to “LightSpeed and LINQPad: the perfect partners”

  • LightSpeed and LINQPad: the perfect partners…

    Thank you for submitting this cool story – Trackback from DotNetShoutout…

  • I just checked out your screencasts – nicely done. One suggestion is that you should probably do some screencasts using Oracle. LINQ already supports SQL Server so to make your demos more compelling, you should show of LINQ queries over Oracle and other DBs.

  • I agreed with comment above from Kris to have some screencasts for Oracle… It would be real handy.

  • Thanks for the feedback Sebastian + Kris. I might do a short one that just shows how to swap between databases. The thing that I find hard to show with a screencast and using Oracle is that LightSpeed makes working with LINQ and other databases amazingly simple. The only difference in the screencasts you see now is that I would set the DataAdapter to Oracle, and use an Oracle connection string in the config file. Nothing else would have to change in the video but those two things.

    Having said all that, somethings need to be seen to be believed and that’s why a short video showing how a developer could change databases might still be useful :-)

    I hope that helps :-)

    John-Daniel

  • […] The Fourth Maxim comes from a weird Robert Downey Jr. Poster at Mindscape […]

  • […] Mindscape LightSpeed ORM […]

  • For anyone experiencing errors with the LightSpeed driver in LINQPad v2.21, there’s a LINQPad update to fix this (v2.22):

    http://www.linqpad.net/beta.aspx

    Cheers
    Joe

  • Leave a Reply

Archives

Join our mailer

You should join our newsletter! Sent monthly:

Back to Top