Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Confused as how to get unique value of the attribute
Message
 
 
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01641789
Message ID:
01641792
Views:
26
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform