FirstOrDefault inline null checking

c# entity-framework entity-framework-6 linq

Accepted Answer

Try this:

Rating = s.Performance.OrderByDescending(o => o.Year)
                      .Select(o => o.Rating)
                      .FirstOrDefault()
9
8/25/2015 2:50:46 AM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow