I know in normal Linq grammar, orderby xxx descending is very easy, but how do I do this in Lambda expression?
I know in normal Linq grammar, orderby xxx descending is very easy, but how do I do this in Lambda expression?
LastOrDefault() is usually not working but with the Tolist() it will work. There is no need to use OrderByDescending use Tolist() like this.
GroupBy(p => p.Nws_ID).ToList().LastOrDefault();