Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert this to non SQL like LINQ
Message
 
To
All
General information
Forum:
ASP.NET
Category:
LINQ
Title:
Convert this to non SQL like LINQ
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01609048
Message ID:
01609048
Views:
68
Hi all, is the code below rewritable in non SQL like syntax
int NumEmployees = 4;

GridView1.DataSource = (from department in dbContext.Department
                                    where department.Employee.Count > NumEmployees
                                    orderby department.Name
                                    select new
                                    {
                                        Name = department.Name ,
                                        Employees = department.Employee // this is a collection.
                                    }).ToList();
just learning LINQ and wondered how to do this in the more dot way e.g obj.Where(x => x.Whatever == Whatever);
Regards,
Peter J. Kane



Pete
Next
Reply
Map
View

Click here to load this message in the networking platform