Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 81910

How to use OrderByDescending properly

$
0
0

Hi xamarin forum

I tried every sample I can found over the net but still I have error to

Cannot implicitly convert type 'System.Collections.Generic.List' to 'entities.tablename'

anyway here is the code I use

    public MethodName Get(int Id)
        {
            using (EnititiesName entities = new EnititiesName())
            {
                var rsult = entities.tablename.OrderByDescending(tablename => tablename.Date_Uploaded).ThenByDescending(tablename => tablename.Id);
                return rsult.ToList();
            }
        }

Viewing all articles
Browse latest Browse all 81910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>