The linq-query-syntax tag has no wiki summary.
0
votes
0answers
23 views
How can I build the permutation in query syntax?
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;
partial class Permutable /* private methods */ {
...
2
votes
2answers
73 views
Can I specify Queryable.GroupBy (instead of Enumerable.GroupBy) in query expression syntax
When I write a Group By in query expression syntax, the compiler automatically picks Enumerable.GroupBy as my intended tareget method and I get an IEnumerable back instead of an IQueryable. That ...
0
votes
3answers
103 views
LINQ Error when using multiple JOIN in same statement on CRM 2011 Plug-in
Hi I am trying to join multiple entities in CRM 2011 but I get and error saying: {"'xrmsm_sessionEnrollments' entity doesn't contain attribute with Name = 'xrmsm_termsid'."}. That is correct but I am ...
0
votes
3answers
77 views
How to Convert LINQ Comprehension Query Syntax to Method Syntax using Lambda
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 Syntax ...
0
votes
0answers
46 views
How to Query Complex Many-to-Many Relationships in Entity Framework 4.1
Below is my SQL Server 2005 table data:
User
Userid
Name
Division
DivisionID
Name
Group
GroupID
Name
DivisionGroups
DivisionID
GroupID
UserGroups
UserID
GroupID
In Entity ...
0
votes
0answers
54 views
i want help(query) linq to xml for data binding [duplicate]
I would like to read below XML and print the output in following order.Can you pls help with Query or solutions
<Categories>
<Category name="Category1">
<Articles>
...
0
votes
1answer
86 views
LINQ Query across Associations
I have an Entity Framework that is generated from my database. Within this database is a table called User_Security_Role that is composed of two fields: Employee_ID and User_Name. Both fields act as ...
0
votes
0answers
116 views
Bind BindongSource to Linq query and Filtering BindingSource
I want to bind DataGridView to LINQ query while I can Filter DataGridView Rows.
As I can not convert LINQ to DataView directly, then I use BundingSource.I've not been able to filter rows yet!
...
4
votes
2answers
248 views
Convert EF LINQ method syntax to query syntax
How would you write this exact same query using the LINQ query syntax?
var q2 = list.GroupBy(x => x.GroupId)
.Select(g => g
.OrderByDescending(x => x.Date)
...
4
votes
2answers
433 views
Linq-to-SQL, pass Expression<Func<T, T>> to select method in query syntax
Suppose, we have next code:
public class Dto
{
public int Id;
public string Name;
}
...
using (var db = new NorthwindDataContext())
{
var q = from boss in db.Employees
from ...
0
votes
0answers
57 views
How to apply Cascading stylesheet in Asp.netwebapi?
I have WebAPi Return Data HTMl Format below like that:
Asp.net WebAPI code
public string GetMenus()
{
MenuModel menuwebapi = new MenuModel();
return ...
0
votes
1answer
96 views
Filtering Linq Query Correctly
I have this query that retrieves sales from a bunch of shops, and returns them as a list. On my report request screen, the user can filter by a number of ids - ShopOwnerId, ShopRegionId, ShopTypeCode, ...
2
votes
4answers
601 views
Convert stored procedure to LINQ
I'm using MVC3 and still learning LINQ. I'm having some trouble trying to convert a query to LINQ to Entities. I want to return an Json method
My stored procedure
Create Procedure ...
0
votes
2answers
149 views
Return list of specific property of object using linq
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 ...
0
votes
3answers
145 views
Linq Nested Inner Joins
I want to join the following Tables
1. B_Book[1st Table]
-B_BID (Book ID)(PK)
-B_Name
-B_CategroyID (FK)
2. BI_BookInstance [2nd Table]
-BI_IID(Instance ID)
-BI_BID (FK)
...