Garima Bansal

Garima Bansal

  • 1.1k
  • 692
  • 41.1k

Set order by descending in linq query

Jan 24 2024 6:33 AM

Below is the linq query and i want list in Order by Descending

 ensure = (from resultlist in db.application
                          join flow in db.line on resultlist.appcode equals flow.applnno

                          where resultlist.distcode == distcode && resultlist.status.Trim() == "LDT" && flow.deptcode == deptcode && (flow.status == null)
                          select new linedeptmodel
                          {
                              applnno = resultlist.appcode,
                              applicantname = resultlist.appname,
                              doorno = resultlist.appaddrplotdoorno,
                              street = resultlist.appaddrstreet,
                              city = resultlist.appaddrcity,
                              pincode = resultlist.appaddrpincode,
                              sitedoorno = resultlist.siteaddrplotdoorno == null ? resultlist.siteplotno : resultlist.siteaddrplotdoorno,
                              sitestreet = resultlist.siteaddrstreet,
                              sitecity = resultlist.siteaddrcity,
                              sitelocality = resultlist.siteaddrarea,
                              sitepincode = resultlist.siteaddrpincode
                          }).ToList();


Answers (1)