You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by TwentyFourMinutes November 2, 2022
Currently when you have a linq syntax query it will produce something like the following:
varresult=await(frompostin dbContext.Posts
where post.Id ==1selectpost).AsNoTracking().FirstAsync();
which seems fine at first, however, these queries can get quite large fairly quickly. We currently manually format it with empty lines e.g.
varresult=await(frompostin dbContext.Posts
join blog in dbContext.Blogs on post.BlogId equals blog.Id
let count = dbContext.Posts.Count(p => p.Name == post.Name)where post.Id ==1selectnew{
Post = post,
Blog = blog,
SamePostNameCount = count
}).AsNoTracking().FirstAsync();
Anyhow, csharpier would strip out empty lines which can get very unreadable on even larger queries.
Proposal:
Allow single blank lines between two statements, but truncate more than that down to 1.
Do you have had any thoughts on this yet? Or on this rather small proposal?
The text was updated successfully, but these errors were encountered:
Discussed in https://github.com/belav/csharpier/discussions/750
Originally posted by TwentyFourMinutes November 2, 2022
Currently when you have a linq syntax query it will produce something like the following:
which seems fine at first, however, these queries can get quite large fairly quickly. We currently manually format it with empty lines e.g.
Anyhow, csharpier would strip out empty lines which can get very unreadable on even larger queries.
Proposal:
Allow single blank lines between two statements, but truncate more than that down to 1.
Do you have had any thoughts on this yet? Or on this rather small proposal?
The text was updated successfully, but these errors were encountered: