Click here to Skip to main content
15,912,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends


i m fill model in mvc my code is


var data = (from cno in db.CRL_NewTest_Order
where cno.Date >= fromdat && cno.Date <= todat && cno.CRL_OrderTestSampleRelation.Any(r => r.SampleStatus == "Accept")


join re in db.CRL_ResultEntry_Master on cno.Order_Id equals re.RequestID
into t from rt in t.DefaultIfEmpty()

select new Labviewmodel
{
Order_Id = cno.Order_Id,
F_Id = cno.F_Id,
PatientDetails = cno.P_F_Name + " " + cno.P_Name + ", " + cno.Gender + ", " + cno.Age + " " + cno.Age_YMD,
CRL_OrderTestRelation = cno.CRL_OrderTestRelation,
CRL_OrderTestSampleRelation = cno.CRL_OrderTestSampleRelation,
Date = cno.Date,
ReportStatus = rt.ResultStatus,
RefNo = cno.RefNo
}).OrderByDescending(c => c.Date).ToPagedList(No_Of_Page, Size_Of_Page);

Is it write or someone have other best option .

thanks and regards
pardeep barak
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900