Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Confused as how to get unique value of the attribute
Message
 
 
À
10/10/2016 09:54:17
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01641789
Message ID:
01641792
Vues:
27
>Also I'd suggest splitting the query so that (a) you can better identify where the error lies and (b) inspect the intermediate results:
tmp = matrixTemplateViewModel.TemplateValues.Where(x=>x.AtnameId!=matrixTemplate.PrimAxis);
>               
>matrixTemplateViewModel.ColumnAttributeId  = tmp.Select(x => new { x.AtnameId }).Distinct().FirstOrDefault();
In compile time I get 'Cannot implicitly convert type < anonymous type: int AtnameId to int > ' on the second line.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform