Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to reference .linq file in LinqPad

Tags:

linqpad

is it possible to call/reference functions in another query file beside MyExtensions in LinqPad?

like image 527
cilerler Avatar asked Oct 06 '22 18:10

cilerler


2 Answers

You can call one script from another:

Another way to combine scripts is to dynamically execute one script from another. The Util.Run method does exactly that, and is useful in both interactive and command-line scenarios:

string htmlResult = Util.Run ("test.linq", QueryResultFormat.Html).AsString();

Note: If you feed Util.Run a relative path, it will resolve it relative to the 'My Queries' directory rather than the current directory. You can switch its behavior by specifying .\test.linq instead of test.linq in this example.

From:

  • LINQPad Command-Line and Scripting
like image 109
Kenny Evitt Avatar answered Oct 10 '22 01:10

Kenny Evitt


No, this isn't possible right now.

like image 28
Joe Albahari Avatar answered Oct 10 '22 02:10

Joe Albahari