Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert this to non SQL like LINQ
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Titre:
Convert this to non SQL like LINQ
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01609048
Message ID:
01609048
Vues:
69
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform