Hi
I have below code & i want to create API using htpResponseMessage.

Thanks
Hi
I have below code & i want to create API using htpResponseMessage.

Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Deepak TewatiaRank #142 · 16K reputationPosted Dec 18, 2022, 11:06 AM EST
Hi Ramco,
Based on your problem you can use below code :-
[HttpGet] public HttpResponseMessage GetData(DateTime frDate, DateTime toDate, string ddlDeliveryStatus) { var result = (from t in context.ViewSessionDeliveryCalendarDetailsStudents join t2 in context.ViewBookDetails on t.BookID equals t2.ID where t.CurrentStatus == "Due" && t.SessionDate.Value.Date >= frDate && t.SessionDate.Value.Date new CustomDto { GroupName = x.GroupName, SessionDate = x.SessionDate, BookTitle = x.BookTitle, AmazoName = x.AmazoName, AmazonURL = x.AmazonURL }).ToList(); return Request.CreateResponse(HttpStatusCode.OK, data); }