I have SQL Query like this :
select top 1 Newsletter_HTML_Tag from Newsletter_TBL
where (Newsletter_Category_ID=1)
order by Creation_Date desc
and I also have a method which give me the list of all records from Newsletter_TBL
named:
NewsletterGellAll()
and I have tried it before, but it doesn't work:
NewsletterGellAll()
.FirstOrDefault(c => c.NEWSLETTER_CATEGORY_ID == 1)
.orderby(a => a.Creation_Date)
How can I fix it?
use LINQPad and make professional LINQ and SQL queries. here is linqpad