Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Linqtoentities syntax
Message
De
02/07/2010 04:49:42
 
 
À
01/07/2010 17:03:02
Stan Blatti
Shelby Residential & Vocational Services
Memphis, Tennessie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01471213
Message ID:
01471273
Vues:
46
>I think the problem is when I add new { ...}, I am converting the LINQ to an anonymous type and they cannot be returned or are not meant to be returned. One can analyze the results of this anonymous query in the method itself with no problems.
>Thanks for your feedback.

If the resulting collection does not need to be attached to the context then you could just define a simple class and create instances of that rather than an anonymous type. If the results *do* need to be EntityObjects then the simplest approach is to create an additional entityset in the edmx designer - just copy and paste the existing item and remove all the unwanted fields from the copy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform