Information générale
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Network:
Windows 2008 Server
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement