Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> LinqPad for Linq to LLBL
 

Pages: 1 2 3 4
LLBLGen Pro Runtime Framework
LinqPad for Linq to LLBL
Page:2/4 

  Print all messages in this thread  
Poster Message
MarcoP
User



Location:

Joined on:
29-Sep-2004 14:15:43
Posted:
270 posts
# Posted on: 04-Jun-2010 02:49:01.  
thanks!
  Top
Joe Albahari
User



Location:

Joined on:
06-Jun-2010 15:03:48
Posted:
3 posts
# Posted on: 06-Jun-2010 15:10:50.  
If you want the driver to populate LINQPad's SQL translation tab, you can do so by writing to Util.SqlOutputWriter. You can hook this up in the InitializeContext method.

Cheers

Joe


  Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 07-Jun-2010 13:51:48.  
Joe Albahari wrote:
If you want the driver to populate LINQPad's SQL translation tab, you can do so by writing to Util.SqlOutputWriter. You can hook this up in the InitializeContext method.

As it happens I have just committed my first attempt at this here:
http://rapiddevbookcode.codeplex.com/SourceControl/changeset/view/67103#1095380, it works but trying to use a lambda event handler like you suggest in your documentation
Code:
EventHandler<EventArgs> handler = (sender, e) =>...
always gave me a 'Error binding to target method' exception, so I ended up just having a normal event handler method on the driver and assigning the executionManager to a field on the driver.

Joe - any idea how how to get the lambda event handler to work?
Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
Joe Albahari
User



Location:

Joined on:
06-Jun-2010 15:03:48
Posted:
3 posts
# Posted on: 07-Jun-2010 17:42:00.  
Not quite sure if this answers you question, but you don't have to use reflection to access LLBLGen types. You can statically bind to LLBLGen's assemblies because the AssemblyVersion doesn't change between LLBLGEN updates. Hence you can use ordinary event handlers and access properties and methods directly.

Joe


  Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 07-Jun-2010 23:10:36.  
Joe Albahari wrote:
Not quite sure if this answers you question, but you don't have to use reflection to access LLBLGen types. You can statically bind to LLBLGen's assemblies because the AssemblyVersion doesn't change between LLBLGEN updates. Hence you can use ordinary event handlers and access properties and methods directly.

SQLTraceEvent isn't a LLBLGen defined event, it's one that will have be added to every one's DAL code to enable SQL Translation Tab population. See http://rapiddevbookcode.codeplex.com/wikipage?title=LLBL4linqpad
a lambda event handler works when I tried it in frmTrace.cs but not in the driver. Method attributes seem to be different.
Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 05-Jul-2010 13:23:29.  
I've released a new version of my LLBLGen LINQPad Data Context Driver (v1.1)
Main new feature is the SQL trace showing in the SQL Translation Tab (if you jump through a few hoops in your own code).


Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
carni4
User



Location:

Joined on:
09-Aug-2010 20:05:04
Posted:
20 posts
# Posted on: 10-Aug-2010 16:04:58.  
I'm getting the following error message with LinqPad4:

FileNotFoundException: Could not load file or assembly 'SD.LLBLGen.Pro.DQE.SqlServer.NET20, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' or one of its dependencies. The system cannot find the file specified.

Any ideas on how to fix it? I tried launching LINQPad.exe from the directory containing that dll and it didn't help.

I also tried LinqPad v2.21 and got the following message:

Could not load file or assembly 'LINQPad, Version=1.0.0.0, Culture=neutral, PublicKeyToken=21353812cd2a2db5' or one of its dependencies. The system cannot find the file specified.

Any advice is much appreciated!
  Top
Joe Albahari
User



Location:

Joined on:
06-Jun-2010 15:03:48
Posted:
3 posts
# Posted on: 10-Aug-2010 16:13:08.  
carni4 wrote:
I'm getting the following error message with LinqPad4:

FileNotFoundException: Could not load file or assembly 'SD.LLBLGen.Pro.DQE.SqlServer.NET20, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' or one of its dependencies. The system cannot find the file specified.

Any ideas on how to fix it? I tried launching LINQPad.exe from the directory containing that dll and it didn't help.

I also tried LinqPad v2.21 and got the following message:

Could not load file or assembly 'LINQPad, Version=1.0.0.0, Culture=neutral, PublicKeyToken=21353812cd2a2db5' or one of its dependencies. The system cannot find the file specified.

Any advice is much appreciated!


Do you get the same result with the latest beta build?
http://www.linqpad.net/beta.aspx


  Top
carni4
User



Location:

Joined on:
09-Aug-2010 20:05:04
Posted:
20 posts
# Posted on: 10-Aug-2010 17:11:12.  
Update: It must have something to do with the fact that I have the very latest build of LLBLGen (from August 5th, 2010) because, after following the instructions at

http://rapiddevbookcode.codeplex.com/wikipage?title=LLBL4linqpad

to build from source--modifying the paths in the DevDeploy.bat file(s) because I am on Windows 7--I was able to get it working. However, at the moment only v2.21 is working. I am getting an error with LinqPad4 that it can't load "System.Design".

Thank you for your reply Joe. I tried again with beta 4.24 and I get the "System.Design" error message. I have attached a word document containing the error details for your review. However, I am satisfied at the moment because v2.21 is working just fine.

By the way, I'm not sure if this is important or not, but I do not have Visual Studio 2010 installed on this machine. (I edited TomDog's Visual Studio 2010 sln file to get it to open in 2008.) However, like I said I am on Windows 7 and according to the registry (HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP) version 4.0.30319 of the .NET framework is installed.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 10-Aug-2010 17:28:46.  
It could be related to .NET 4.0 client profile vs. .NET 4.0 full framework profile (so you might have installed the .net 4.0 client profile framework which is a stripped down .net 4.0 which doesn't contain the design and web assemblies for example.) Our runtime currently requires .net 4.0 full framework as we haven't created a .net 4.0 build with separate assemblies for design and web specific stuff (as in the past this wasn't an issue, all assemblies were always there)

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
carni4
User



Location:

Joined on:
09-Aug-2010 20:05:04
Posted:
20 posts
# Posted on: 10-Aug-2010 17:41:26.  
Otis wrote:
It could be related to .NET 4.0 client profile vs. .NET 4.0 full framework profile (so you might have installed the .net 4.0 client profile framework which is a stripped down .net 4.0 which doesn't contain the design and web assemblies for example.) Our runtime currently requires .net 4.0 full framework as we haven't created a .net 4.0 build with separate assemblies for design and web specific stuff (as in the past this wasn't an issue, all assemblies were always there)


Good call. That was it! I installed the .NET framework 4.0 Full and LINQPad v4.24 works now. (Again, using what I built from TomDog's source. I haven't retried the downloadable lpx.)

Thanks for the help!
  Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 28-Sep-2010 11:31:01.  
Joe - if you reading this - Drag and drop from the Schema Explorer to query windows doesn't work with your DataContextDriverDemo and hence neither for my LLBL driver. How do I enable this?

Regards Jeremy


Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 17-Dec-2010 12:18:36.  
Just in time for xmas I've released version 1.2 of my LLBLGen LINQPad Data Context Driver for LLBL 3.0.
The one new feature is the Entity Data Browser.

There is also a new release (v1.3 for VS2010) of my Enumerable Debugger Visualizer.



Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
WayneBrantley
User



Location:
USA
Joined on:
10-Mar-2006 16:20:08
Posted:
1112 posts
# Posted on: 17-Dec-2010 17:58:38.  
TomDog - Thanks for this update.
I have installed it.

How do I get the Entity Data Browser to come up?

I typed this.BrowseData() from about everywhere I can find. Not sure what 'this' is supposed to be.

If I open up a c# expression and type it - intellisense comes up - it is supposed to take a parameter? Providing it with a parameter makes it say 'no overload for BrowseData' takes 1 argument.

I can call ShowSelfServicingInGrid() from a linq query and from there can click 'view in object browser'

Probably a silly question, but I just cannot get it to start!


SelfServicing, .Net 4.5, Web Applications, SqlServer 2014  Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 17-Dec-2010 18:56:28.  
WayneBrantley wrote:
TomDog - Thanks for this update.
I have installed it.

How do I get the Entity Data Browser to come up?

I typed this.BrowseData() from about everywhere I can find. Not sure what 'this' is supposed to be.

If I open up a c# expression and type it - intellisense comes up - it is supposed to take a parameter? Providing it with a parameter makes it say 'no overload for BrowseData' takes 1 argument.

I can call ShowSelfServicingInGrid() from a linq query and from there can click 'view in object browser'

Probably a silly question, but I just cannot get it to start!

Not silly at all, an omission on my part sorryEmbarrassed, it needs to be called inside a C# statement not in the default expresson as expressons have an implicit '.Dump()' call after them which is giving the error as BrowseData() returns void.
I've updated the docs.

'view in object browser' is something different, it's an Object Inspector similar to the one in the LLBL designer.
Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 18-Aug-2011 12:12:52.  
I've released version 2.0 of my LLBLGen LINQPad Data Context Driver for LLBL versions 3.0 and 3.1.

New features include:
  • Schema Explorer nodes tooltips now show descriptions, custom properties, mapped database object info and display names associated with the node item
  • Schema Explorer field nodes text now shows the maximum value of the fields and if they are primary or foreign keys
  • Drag and drop nodes from the Schema Explorer to the query window
  • Support for LLBL model assemblies without an ILinqMetaData implementation
  • Improved Connection dialog with connection string editor for Microsoft data providers
  • UI for adding additional assemblies and namespaces including a button to quickly add those needed for QuerySpec
  • Connection dialog tab for SQL query configuration


Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
joealbahari
User



Location:
Perth, Austrlaia
Joined on:
10-Sep-2008 15:07:09
Posted:
2 posts
# Posted on: 19-Aug-2011 03:45:54.  
Sounds great. If you'd like me to add a link to download the driver from LINQPad's drivers gallery, let me know.

Joe
Author, C# 3.0 in a Nutshell  Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 19-Aug-2011 04:23:12.  
joealbahari wrote:
Sounds great. If you'd like me to add a link to download the driver from LINQPad's drivers gallery, let me know.

Yeah probably about time it was on there.

If we need to discuss it further maybe send me a message via my codeplex profile
http://www.codeplex.com/site/users/view/JezzaT



Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
joenathan
User



Location:

Joined on:
28-Jun-2011 22:07:25
Posted:
27 posts
# Posted on: 04-Nov-2011 16:44:01.  
TomDog wrote:
I've released a new version of my LLBLGen LINQPad Data Context Driver (v1.1)
Main new feature is the SQL trace showing in the SQL Translation Tab (if you jump through a few hoops in your own code).


Are there any other hoops besides adding in that static event in the CommonDaoBase class?

I've added this

Code:

    partial class CommonDaoBase
    {
        public static event EventHandler<SQLTraceEventArgs> SQLTraceEvent;
        }


Along with the QueryToSQL.cs and SQLTraceEventArgs.cs that you have defined

http://rapiddevbookcode.codeplex.com/SourceControl/changeset/view/67103#1106701

and

http://rapiddevbookcode.codeplex.com/SourceControl/changeset/view/67103#1108434

however I'm not getting any SQL to show up in the trace tab. It's not throwing any errors, just not displaying anything.
  Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 09-Nov-2011 11:06:23.  
joenathan wrote:
TomDog wrote:
I've released a new version of my LLBLGen LINQPad Data Context Driver (v1.1)
Main new feature is the SQL trace showing in the SQL Translation Tab (if you jump through a few hoops in your own code).


Are there any other hoops besides adding in that static event in the CommonDaoBase class?

I've added this

Code:

    partial class CommonDaoBase
    {
        public static event EventHandler<SQLTraceEventArgs> SQLTraceEvent;
        }


Along with the QueryToSQL.cs and SQLTraceEventArgs.cs that you have defined

http://rapiddevbookcode.codeplex.com/SourceControl/changeset/view/67103#1106701

and

http://rapiddevbookcode.codeplex.com/SourceControl/changeset/view/67103#1108434

however I'm not getting any SQL to show up in the trace tab. It's not throwing any errors, just not displaying anything.

Yes you'll need to add CommonDaoBase.Extended.cs - http://rapiddevbookcode.codeplex.com/SourceControl/changeset/view/67103#1106733


Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
joenathan
User



Location:

Joined on:
28-Jun-2011 22:07:25
Posted:
27 posts
# Posted on: 09-Nov-2011 13:37:14.  
That worked like a charm thanks TomDog Regular Smiley
  Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 27-Jan-2012 11:12:44.  
Continuation from http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=18186
Otis wrote:
talking about codeplex and sourcecode, we'll fork your LinqPad driver (which is buried inside a bigger project) and include it with v3.5. Of course you'll get full credit. We have to see whether we ship it as sourcecode (if the license is too restrictive) or binary only. This way more people will be able to use it as it's installed by default.

Ahh the moment I've been waiting forLaugh

Yes be good to ship the source - I'll change the license if that gets in the way.
I don’t think there is much point in shipping a binary as the easiest way to install it is to host the driver and get Joe Albahari to add it to the drivers gallery, I had an email conversation with him about adding mine but it took me a while to find a place to host it and I haven't heard back from him since I did.

Otis wrote:
Codeplex is incredibly slow at the moment (<20KB / sec), so I couldn't pull the full sourcecode (31mb) of the complete project with the linqpad driver. As far as I could see the linqpad driver still contains a tremendous amount of code. Is all that necessary to make it work with linqpad? (like: it needs to get a complete model?) If so, I can help with that, as I've done this 3 (or even more) times already for various frameworks (Dyn. data, ria services, and now with OData) so I think I can optimize it properly with code borrowed from one or all three. (so no reflection necessary)

Is there a separate project for the linqpad driver or do I need the complete 31 MB of code and cut it out of it?

How are you trying to get the source? TortoiseSVN is the best tool to get it.
There are 3 branches - the only one you need is [url]https://rapiddevbookcode.svn.codeplex.com/svn/LLBLPro v3.1[/url] though you do need to load the solution with everything in it - AW and DataContextDriver.sln
I'm currently working on version 2.1 of the driver which takes advantage of the new features in the LinqPad Beta, so obviously you will need the Beta to compile it.

As to the code in the driver there are 3 distinct parts to it:
Connection dialog
Schema explorer population
Query execution

It give me much joy to see all the reflection removed though I think it would take some changes to the LLBL support classes to do that but we'll see.
That would help remove a lot of code, also I've implemented two methods of populating the schema explorer, one is pretty much what came with Joe's sample driver and the newer one which uses IFieldPersistenceInfo etc to provide rich tooltips and to set the new SqlName and SqlTypeDeclaration fields in the ExplorerItem, you could get rid of the old method to reduce the size. Also the default connection properties in the Connection Dialog are no longer needed as maybe is support for LLBL model assemblies without an ILinqMetaData. There is probably more that could go.


Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 27-Jan-2012 16:56:33.  
Ok, I'll get back to you next week about this. My naive assumption was to 'fork the code, recompile and include it in the beta', but that's a bit too much. We'll ship v3.5's beta on monday so after that I'll have some time to look into this and see whether we can create a build before RTM, otherwise we'll add it after RTM.

I think what's best is that I copy the code which forms the driver and create a new project (so effectively a fork without the rest of the code) on codeplex. I'll use Hg, are you familiar with that? I'll then add you as a full committer so you can commit the code changes you're planning to that code base, if you want to of course Wink.

Would that fit with the way you work on this? If not, that's fine too, it will then just require more code-copying I think, but it might fit better in your overall project to keep it there, not sure.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 29-Jan-2012 10:28:38.  
Otis wrote:
Ok, I'll get back to you next week about this.

I think what's best is that I copy the code which forms the driver and create a new project (so effectively a fork without the rest of the code) on codeplex. I'll use Hg, are you familiar with that? I'll then add you as a full committer so you can commit the code changes you're planning to that code base, if you want to of course Wink.

Would that fit with the way you work on this? If not, that's fine too, it will then just require more code-copying I think, but it might fit better in your overall project to keep it there, not sure.

I'm not sure how best to proceed as my driver is dependent on a few helper projects plus it has some extras such as the 'LINQPad DataEditor' plus the unit test have even more dependencies (two DAL projects) which by the time you add them you have the majority of my projects.

All of which makes me consider starting from scratch (with a lot of copy and pasting of course), anyway we should maybe take this offline, you can reach me via my codeplex profile if you don't have my email already.

As for using Mercurial - I've installed TortoiseHg to download code off codeplex projects but that's all I've ever used it for.


Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 01-Feb-2012 11:23:38.  
TomDog wrote:
Otis wrote:
Ok, I'll get back to you next week about this.

I think what's best is that I copy the code which forms the driver and create a new project (so effectively a fork without the rest of the code) on codeplex. I'll use Hg, are you familiar with that? I'll then add you as a full committer so you can commit the code changes you're planning to that code base, if you want to of course Wink.

Would that fit with the way you work on this? If not, that's fine too, it will then just require more code-copying I think, but it might fit better in your overall project to keep it there, not sure.

I'm not sure how best to proceed as my driver is dependent on a few helper projects plus it has some extras such as the 'LINQPad DataEditor' plus the unit test have even more dependencies (two DAL projects) which by the time you add them you have the majority of my projects.

Ok. What I initially want is first the driver, so it can be shipped with LinqPad's installer. I don't know what the unittests do exactly, do they test what meta-data is delivered?

Quote:

All of which makes me consider starting from scratch (with a lot of copy and pasting of course), anyway we should maybe take this offline, you can reach me via my codeplex profile if you don't have my email already.

As for using Mercurial - I've installed TortoiseHg to download code off codeplex projects but that's all I've ever used it for.

From orm profiler, we've learned the best way to work with Hg in a distributed environment is to use a branch per developer and merge frequently to a trunk and pull from that trunk again, so you get eachothers changes. It has some getting used to, but other than that, it's pretty easy. If you are familiar with SVN, see it like this: you work in your own branch, when you have something which compiles and works, I'll merge your changes with the main trunk and you simply pull from that again to get my changes. So instead of simply commit and update, you have to switch the local copy to a different branch and update. Once you've seen it, it's easy.

We're currently busy with v3.5's beta and the docs overhaul, so I think we'll have to postpone this work for a couple of weeks. I'll see if I can get things set up quickly in the coming weeks so it can be wrapped up after v3.5 launches.

I don't mind using the forums. As it's open source, perhaps others want to chime in as well. Wink. I'll keep you posted once I have the repository created and some code uploaded. When we've something working as a driver, I'll mail Joe to see whether the driver can be included in the linqpad installer as well (or at least added to their website).
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1 2 3 4  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.