Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

return last row if all other condition fails in linq c#

Mains.GroupBy(l => l.ContactID)
.Select(g=>g.OrderByDescending(c=>c.ID).FirstOrDefault()) 
.ToList()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #row #condition #fails #linq
ADD COMMENT
Topic
Name
5+5 =