That's already a query expression. If you mean you want to convert the Any part to another query expression - you can't. There's no query expression support for Any If you actually meant it the other way round, your query is equivalent to: var myGroupsTypesList = context.
CmsGroupsTypes . Where(g => g.CmsContents. Any(x => x.
ContentId == myContentId)).
That's already a query expression. If you mean you want to convert the Any part to another query expression - you can't. There's no query expression support for Any.
If you actually meant it the other way round, your query is equivalent to: var myGroupsTypesList = context. CmsGroupsTypes . Where(g => g.CmsContents.
Any(x => x. ContentId == myContentId)).
Once again thanks for your time on this! – GibboK Jul 5 at 10:50 1 @GibboK: You could use a join... but why not just stick with it as it is? There's no point in avoiding using everything which isn't available in query expression form.
– Jon Skeet Jul 5 at 10:52 I understand your point, just try to learn different way to get the same result, so I can learn more about Linq. Thanks for now – GibboK Jul 5 at 11:00.
A lambda expression is an anonymous function that you can use to create delegates or expression tree types. By using lambda expressions, you can write local functions that can be passed as arguments or returned as the value of function calls. Lambda expressions are particularly helpful for writing LINQ query expressions.
To create a lambda expression, you specify input parameters (if any) on the left side of the lambda operator =>, and you put the expression or statement block on the other side. For example, the lambda expression x => x * x specifies a parameter that’s named x and returns the value of x squared. The => operator has the same precedence as assignment (=) and is right-associative.
Lambdas are used in method-based LINQ queries as arguments to standard query operator methods such as Where. When you use method-based syntax to call the Where method in the Enumerable class (as you do in LINQ to Objects and LINQ to XML) the parameter is a delegate type System. A lambda expression is the most convenient way to create that delegate.
When you call the same method in, for example, the System.Linq. Queryable class (as you do in LINQ to SQL) then the parameter type is an System.Linq.Expressions. Expression where Func is any Func delegates with up to sixteen input parameters.
Again, a lambda expression is just a very concise way to construct that expression tree. The lambdas allow the Where calls to look similar although in fact the type of object created from the lambda is different. In the previous example, notice that the delegate signature has one implicitly-typed input parameter of type int, and returns an int.
The lambda expression can be converted to a delegate of that type because it also has one input parameter (x) and a return value that the compiler can implicitly convert to type int. (Type inference is discussed in more detail in the following sections.) When the delegate is invoked by using an input parameter of 5, it returns a result of 25. Lambdas are not allowed on the left side of the is or as operator.
All restrictions that apply to anonymous methods also apply to lambda expressions. For more information, see Anonymous Methods (C# Programming Guide).
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.