LinqPad for Linq to LLBL

Posts   
1  /  2  /  3  /  4
 
    
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 13-Jan-2009 21:03:16   

LinqPad is proving to be a very useful tool for learning LINQ and also proofing a LINQ query before using it in code.

I was wondering if anyone has tried (or knows how) to add support for LLBL's Linq provider to LinqPad?

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 13-Jan-2009 22:31:40   

At the moment we don't think it will be an easy thing to do, as the LinqToLLBLGenPro code needs to be generated by LLBLGen before it can be used.

It may be worth contacting the maintainer of LinqPad to see what he thinks ?

Matt

mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 04-Feb-2009 10:37:38   

omar wrote:

LinqPad is proving to be a very useful tool for learning LINQ and also proofing a LINQ query before using it in code.

I was wondering if anyone has tried (or knows how) to add support for LLBL's Linq provider to LinqPad?

I started a similar project a while ago. Due to time restrictions it is in a half-done state http://cs.rthand.com/blogs/blog_with_righthand/archive/2008/10/20/Providing-syntax-editor-within-a-.net-application.aspx If there is enough interest I might consider finishing it.

omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 04-Feb-2009 21:17:51   

Looks very promising. Count me in as an early tester

TomDog
User
Posts: 618
Joined: 25-Oct-2005
# Posted on: 06-Aug-2009 10:52:10   

I've started using LINQPad with LLBL; works well though I had to jump through a few hoops, see this thread that I assume you started Omar: http://forums.oreilly.com/content/C-3-0-in-a-Nutshell/996/Linqpad-Support-For-Llbl/

Of course LINQPad is handy for a lot of more than just LINQ.

It's a pity mihies 'Righthand's LLBLGenPro Query Studio' never got released.

Jeremy Thomas
MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 06-Aug-2009 22:22:04   

Thanks for the update.

Matt

Posts: 1251
Joined: 10-Mar-2006
# Posted on: 07-Aug-2009 08:47:51   

Wow..that was a pain, BUT I finally have it WORKING complete with intellisense. Very, very cool... sunglasses sunglasses

mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 07-Aug-2009 11:33:52   

TomDog wrote:

I've started using LINQPad with LLBL; works well though I had to jump through a few hoops, see this thread that I assume you started Omar: http://forums.oreilly.com/content/C-3-0-in-a-Nutshell/996/Linqpad-Support-For-Llbl/

Of course LINQPad is handy for a lot of more than just LINQ.

It's a pity mihies 'Righthand's LLBLGenPro Query Studio' never got released.

Yep, time is not on my side lately nor is public interest. It isn't scratched though.

TomDog
User
Posts: 618
Joined: 25-Oct-2005
# Posted on: 18-Dec-2009 11:03:38   

mihies wrote:

Yep, time is not on my side lately nor is public interest. It isn't scratched though.

Strange the lack of interest, I find LINQPad really handy, so much so I've created a LINQPad DataEditor and thanks to this new enhancement: LINQPad Data Context Extensibility Model there will be first-class support in LINQPad for LLBL as soon as someone writes a driver. Which I might have a go at... unless someone else is already going to - Frans???

Jeremy Thomas
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 18-Dec-2009 14:17:13   

It's on my list to do this month, but v3 stuff has top priority at the moment so it's left for spare time coding. It shouldn't be too hard to fill in the blanks, I already had some discussions with Joe about this. simple_smile

If you have some spare time and want to have a go at it, by all means do simple_smile , though don't feel obligated to do this in any way, we'll get to it as soon as time permits.

If you need info from me, please let me know either in this thread or through email to support AT llblgen DOT com. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 18-Dec-2009 20:12:56   

I have found Linqer (http://www.sqltolinq.com/) extremely useful. It converts my SQL queries into LinqToSQL or LinqToEntitites (depending on my choice of data link mapping files I generate from VS.NET).

Imagine writing your SQL query and then asking Linqer (or some other software) to covert it to LinqToLLBL. Now thats a true time saver.

This is something I am currently experiencing first-hand in the current project. Writing complex LINQ queries is a breeze as I write my SQL queries and convert them to LinqToSQL and they would mostly work with no change for LinqToLLBL.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 21-Dec-2009 10:42:22   

Good tip! Never heard of the tool but it seems useful simple_smile

Frans Bouma | Lead developer LLBLGen Pro
TomDog
User
Posts: 618
Joined: 25-Oct-2005
# Posted on: 24-Dec-2009 02:18:40   

Otis wrote:

It's on my list to do this month, but v3 stuff has top priority at the moment so it's left for spare time coding. If you have some spare time and want to have a go at it, by all means do simple_smile , though don't feel obligated to do this in any way, we'll get to it as soon as time permits.

Good to here it’s on its waysmile I’m not back at work from my Christmas break till the 11th so I guess I can wait till then. Having said that I have made a small start on a static LLBL Data Context Driver if anyone wants to try it out. It populates the tree with what I want – though crashes LINQPad when using one of the context menu’s. If I spend anytime coding I might put my efforts into making my DataEditor pageable instead.

I saw Linqer but our LLBL project mappings are to different from what it would generate for it to be much use I think, Shame, though I think in LINQ now there are others in my team who still think SQL first so might find it handy.

Anyway Merry Xmas all.

Jeremy Thomas
TomDog
User
Posts: 618
Joined: 25-Oct-2005
# Posted on: 15-May-2010 14:14:07   

Otis wrote:

It's on my list to do this month, but v3 stuff has top priority at the moment so it's left for spare time coding. It shouldn't be too hard to fill in the blanks, I already had some discussions with Joe about this. simple_smile

If you have some spare time and want to have a go at it, by all means do simple_smile , though don't feel obligated to do this in any way, we'll get to it as soon as time permits.

I take it time hasn't been permitting for you disappointed but it has for me simple_smile - I've just released Version 1.0 of a Static LLBLGen Pro Data Context Driver for LINQPad. Give it a whirl.

Jeremy Thomas
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 16-May-2010 10:30:31   

Awesome!! smile I'll give it a try first thing on monday! simple_smile great work!

Frans Bouma | Lead developer LLBLGen Pro
JRR avatar
JRR
User
Posts: 125
Joined: 07-Dec-2005
# Posted on: 16-May-2010 17:49:13   

Just a quick question here - do you still get the sql output for the query - as Linqpad usually does?

My current practice is to create a Linqpad.config file that turns on llblgen tracing, and then I set the connection information in the code block itself. Then I can test out my llblgen queries using the adapter I just created.

But this method sounds way better. sunglasses

JRR avatar
JRR
User
Posts: 125
Joined: 07-Dec-2005
# Posted on: 16-May-2010 19:49:59   

JRR wrote:

Just a quick question here - do you still get the sql output for the query - as Linqpad usually does?

Just to answer my own question, you have to turn tracing on in your .config file specified to linqpad in order to see the sql generated by your linq query.

The llblgen trace sql will appear in the output pane, and there is no sql in the specific 'sql' pane.

(unless I missed something, that is)

Great work nonetheless! sunglasses

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 17-May-2010 09:57:19   

I tried it with adapter, but I keep getting the No DataAccessAdapter instance set on LLBLGenProProvider2 instance. Can't execute query error. The 'browse' on the dataaccessadapter assembly in the connection dialog says 'no public types found' error. I tried with v2.x and v3.0 assemblies. I think I miss a setting, e.g. where to specify the ormsupportclasses/linq assembly ref.

When I use selfservicing, I get 'connection string not initialized'... I feel like an uber n00b wink

Frans Bouma | Lead developer LLBLGen Pro
TomDog
User
Posts: 618
Joined: 25-Oct-2005
# Posted on: 17-May-2010 10:50:22   

Otis wrote:

I tried it with adapter, but I keep getting the No DataAccessAdapter instance set on LLBLGenProProvider2 instance. Can't execute query error. The 'browse' on the dataaccessadapter assembly in the connection dialog says 'no public types found' error. I tried with v2.x and v3.0 assemblies. I think I miss a setting, e.g. where to specify the ormsupportclasses/linq assembly ref.

When I use selfservicing, I get 'connection string not initialized'... I feel like an uber n00b wink

Ha- shoe is on the other footsimple_smile Bummer looks like I will need to test it on more machines - I did find a lot of intermittant failure with assembly references.

I got the 'public types found' error on one or two occasions - then it went away without me doing very much at all.

Things to try: Try it with both LINQPad 2 and 4 - sometimes that was enough to sort things out. If that doesn't work you'll have to use the source and run AW.LLBLGen.DataContextDriver.csproj with C:\Program Files\LINQPad\LINQPad.exe(or whereever) as a start action.

The 2.6 assemblies are included in the driver.

Jeremy Thomas
TomDog
User
Posts: 618
Joined: 25-Oct-2005
# Posted on: 26-May-2010 11:11:20   

Otis wrote:

I tried it with adapter, but I keep getting the No DataAccessAdapter instance set on LLBLGenProProvider2 instance. Can't execute query error. The 'browse' on the dataaccessadapter assembly in the connection dialog says 'no public types found' error. When I use selfservicing, I get 'connection string not initialized'.

Ok I think I've fixed those problems in version 1.0.0.3 of my Static LLBLGen Pro Data Context Drivers for LINQPad - now there is a driver for version 3.0 as well as v2.6.

Jeremy Thomas
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 26-May-2010 13:32:03   

Awesome! simple_smile We're in the final stages of pushing for RTM, so it will be next week till we have time to look at it, but nevertheless great work simple_smile

Frans Bouma | Lead developer LLBLGen Pro
MarcoP avatar
MarcoP
User
Posts: 270
Joined: 29-Sep-2004
# Posted on: 03-Jun-2010 21:32:21   

Im new to linq pad, but i added the LLBL driver and I can see the results when executing a linq expression, but how do i see the sql generated from behind the scenes?

JRR avatar
JRR
User
Posts: 125
Joined: 07-Dec-2005
# Posted on: 03-Jun-2010 21:39:03   

Hi Marco,

I was able to get that working by turning on the LLBLGen DQE tracing in the app.config file linqpad uses.

MarcoP avatar
MarcoP
User
Posts: 270
Joined: 29-Sep-2004
# Posted on: 03-Jun-2010 22:14:46   

Hmm, I just tried adding the config section to linqpad.exe.config but no luck. can you paste in what you are specifying?

JRR avatar
JRR
User
Posts: 125
Joined: 07-Dec-2005
# Posted on: 03-Jun-2010 23:36:17   

Here's what worked for me:

1) Set app.config on the "Query Properties" form:

Then, just make sure your app.config file includes the diagnostic switch like this:


<?xml version="1.0"?>
<configuration>
    <appSettings>
        <add key="DBConn" value="data source=(local)\sqlexpress;initial catalog=xx;integrated security=SSPI;persist security info=False;packet size=4096"/>
    </appSettings>
    <system.diagnostics>
    <switches>
        <add name="SqlServerDQE" value="4" />
    </switches>
</system.diagnostics>
</configuration>

Now you should get the trace output above the actual query resuts. The sql does not show up in the sql tab, but if you are ok with that, this should do the trick.

1  /  2  /  3  /  4