c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
Linq

Get last record with filter condition true in linq

| | ASP-NET , Linq

You can filter the last record from the list of records with filter condition using the following query.

            var qry = db.Submits
                    .Where(m => m.Published == false)
                        .OrderByDescending(m => m.SubmitId)
                        .First();