linq-query-syntax Questions

8

Solved

I'm trying to get a handle on if there's a good time to use standard linq keywords or linq extension methods with lambda expressions. They seems to do the same thing, just are written differe...
Archidiaconal asked 11/11, 2008 at 0:50

4

Solved

Is there a tool, process or a solution that will convert the following LINQ Query Syntax to Method Syntax with Lambdas (dot notation)? I would expect the solution to convert the following Query Syn...
Antinomian asked 3/3, 2013 at 2:52

1

Solved

I'm currently trying to make a Web Api with EF Core, and i'm running into some problems joining the tables i've got together. I'm working with the following Database Diagram: And the data i'm cur...

3

Solved

Given a class like this: public class Stock { public Stock() {} public Guid StockID { get; set; } public string Description { get; set; } } Lets say I now have a List<Stock>. If I woul...
Cryobiology asked 20/7, 2012 at 6:59

4

Solved

How would the following query look if I was using the extension method syntax? var query = from c in checks group c by string.Format("{0} - {1}", c.CustomerId, c.CustomerName) into customerGroups...
Vacla asked 8/6, 2009 at 21:21

6

What method would be considered best practice for parsing a LINQ string into a query? Or in other words, what approach makes the most sense to convert: string query = @"from element in source w...
Auriculate asked 23/3, 2011 at 1:45

2

I'm having a go at implementing C# spec 7.16.2 "Query expression translation" in Roslyn. However, I've run into a problem in 7.16.2.5 "Select clauses". It reads A query express...
Typhoid asked 9/11, 2013 at 14:4

2

Solved

Regarding LINQ query syntax... var foo = new List<int> { 1, 2 }; var boo = from n in foo where n > 1 select n; ...I always thought this syntax was limited to operating on IEnumerable...
Senhauser asked 7/8, 2013 at 21:20

3

Solved

I've tried to write a method which returns the permutation of a given enumerable as simple as possible. The code: using System.Collections.Generic; public static partial class Permutable { stat...
Belfry asked 3/6, 2013 at 22:42

1

Solved

I was working with a DataTable and noticed that Resharper recommended that I can convert a loop into a LINQ expression. I did so and it was rewritten in query expression syntax (simplified): var t...
Retrogradation asked 29/2, 2012 at 16:25

1

Solved

Does anyone stick to any rules (or are you forced to stick to any rules by your employer?) when choosing to use either LINQ query syntax or a Lambda expression inside one of the LINQ extensio...
Raimundo asked 7/11, 2011 at 14:16

2

Solved

After reading "Odd query expressions" by Jon Skeet, I tried the code below. I expected the LINQ query at the end to translate to int query = proxy.Where(x => x).Select(x => x); which does not...
Device asked 30/9, 2010 at 20:7

1

Solved

Consider this LINQ expression written using query notation: List<Person> pr = (from p in db.Persons join e in db.PersonExceptions on p.ID equals e.PersonID where e.CreatedOn >= fromDa...
Doubletongue asked 2/10, 2009 at 21:18
1

© 2022 - 2024 — McMap. All rights reserved.