Search
-
Re: BUG? Preprocessor directive LINQPAD
-
Re: LinqPad and EntityTypeConfiguration
I am using the Fluent API for property mapping. Here is an example: //============== // Region.cs //============== namespace MyProject.Entities { using System.ComponentModel.DataAnnotations; public class Region{ public int RegionId { get; set; } [Required(ErrorMessage = "Region Name is required")] [StringLength(100,… -
Version 7 Editor Bug
Hi I've encountered a strange bug in the LINQPad 7 file editor (haven't checked other versions). I'm currently using version 7.6.6. It happens when you open a file that contains a collapsed #region. If you expand the region and then start to type, it suddenly collapses. The first character you typed appears where the… -
Re: Including one .linq file inside another - please comment
-
#region not supported in Statement mode
Is there a reason #region doesn't work in Statement mode? I was thinking about the perpetual shared code issue with LINQPad and in coming up with a possible implementation, realized that #region would be useful, so I attempted to use it with my hand rolled sharing method (e.g. copy and paste) and discovered it doesn't work… -
Could LinqPad detects modification made to a query from outside the IDE and reload it?
Hi, I had a crazy idea to include/reference others .linq queries. When I want to include a query I create an empty region using the convention #region Include . Then I have a console app watching all my queries for changes, it finds the #region Include ... pattern and try to resolve all the dependencies, and finally merge… -
BUG: Ineligible autocomplete entries (generic extension methods with constraints)
I have some extensions defined to help with chaining expressions with common interfaces and operations. public static class ChainableExtensions{ public static T With<T>(this T source, Action<T> action) { action(source); return source; } public static TResult Let<T, TResult>(this T source, Func<T, TResult> func) { return… -
Is there any support for F# code outlines and/or folding?
-
SQL generated by Linq doesn't include the parameter values (SQL tab)
When running a linq query that contains parameters, the generated query doesn't show the parameter values used. This Linq var x = Guid.Parse("a34e9117-c95e-4b96-8fa0-0002016d915c"); var tasks = Tasks.IgnoreQueryFilters().Where(t=> t.Id == x).Select(t => t.Id).Dump(); Generates this SQL: -- Region Parameters -- @__x_0='?'… -
Location of MyExtensions.
I am looking to use regions in MyExtensions to extract sections into separate files for checkin to source control (git). One query to extract and another query to merge back into MyExtensions, the latter of which also synch in namespace imports and references. Is there a way to verify where LINQPad looks for MyExtensions… -
Re: AWS SDK 3 use in linqpad
-
LP 7 EF Core Context wrong precision
Hello, I use LINQPad 7.3.9 with an Entity Framework Core 6.0.3 context. My table has a column (numeric 6,4) which I need to update. But the created SQL parameter uses the default precision 18, 2: -- Region Parameters -- @p1='1591', @p0='1.0258' (Precision = 18) (Scale = 2) -- EndRegion Therefore the value gets rounded. Is… -
Re: Avoiding bloated and contested MyExtensions. Thoughts?
@Tormod This might help, if you make MyExtensions partial, it makes it very easy to remove, and add sections of functionality to it. #region MyExtension public static partial class MyExtensions { public static string Stuff1; } #endregion MyExtension #region OtherExtension public static partial class MyExtensions { public… -
Re: Parameters disappearing
I am writing an SSRS report which has that particular parameter. As SSRS only accepts SQL and I much prefer to write in LINQ, I am using the generated SQL as the datasource. I could manually manipulate the generated SQL but I would like to avoid that at all costs, other than the Parameters Region. Cheers -
Re: Missing preprocessor symbols for Net Version
In LINQPad, the symbol is just NET6 - this is equivalent to NET6_0_OR_GREATER The default My Extensions query text should contain the following: #region Advanced - How to multi-target// The NET6 symbol is active when the query runs on .NET 6 or later.#if NET6// Code that requires .NET 6 or later#endif#if NET5// Code that… -
Re: LINQPad 8 early preview now available
Would it be possible to have the editor support more collapsible code segments? For a while, LINQPad only supported collapsing top-level and local functions and regions. Sadly other more common types are not collapsible that ought to be: enabled/disabled #if blocks, multiline comments, generally any other blocked code… -
Implement interface breaks code in large script
I'm working on a large script and was creating a new class which would implement an interface. When I had LINQPad implement the interface, it breaks the code in the following class in the script. line 985 here happens to be the end of the "extensions" region I tried to replicate in a smaller script here but it doesn't… -
Updating columns of size nvarchar(max)....
I've created a script to update a column of size nvarchar(max). Upon calling SubmitChanges(), I see the following output in the SQL window.... -- Region ParametersDECLARE @p0 Int = 3065DECLARE @p1 NVarChar(1000) = 'very long string here...' -- (first 1000 characters/1610 shown)-- EndRegionUPDATE [Requests]SET [Data] =… -
LINQ to SQL "Single" optimization
I've noticed that, when using a LINQ to SQL data context, doing a TableName.Single(x => x.Test == 1000) for example, the SQL query that is executed is:-- Region Parameters DECLARE @p0 Int = 1000 -- EndRegion SELECT [t0].[ID], [t0].[Test] FROM [TableName] AS [t0] WHERE [t0].[Test] = @p0 which can be very inefficient - I… -
Can I get more than 1000 characters in the parameters section of the SQL output pane?
I have been using LINQPad to deploy a few large strings directly into a database table, but I recently needed to get the full script of what was being generated so I could deploy in an environment without LINQPad. When I opened the SQL output pane, the declaration which held the variable containing my 9 KB string was…