hello,
Error 1 Cannot implicitly convert type 'System.Collections.Generic.List
Model:
public class SickLeaveData
{
public string Pat_MR { get; set; }
public Boolean IsCitizen { get; set; }
public string MedicalRecordID { get; set; }
public string PatientID { get; set; }
}
API Controller: public class SickLeaveController : ApiController
{
public HttpResponseMessage Get()
{
List sickleavegetdata = new List();
using (MedicalHL7Entities1 dc = new MedicalHL7Entities1())
{
sickleavegetdata = dc.B_HIS_Demog_Pat_Mstr.OrderBy(a => a.Pat_MR).ToList();
HttpResponseMessage response;
response = Request.CreateResponse(HttpStatusCode.OK, sickleavegetdata);
return response;
}
}
}
Sreekanth ReddyPosted Dec 25, 2018, 5:47 AM
Jignesh KumarPosted Dec 27, 2018, 1:35 AM
mohammed IrshadPosted Dec 26, 2018, 12:21 AM
Jignesh KumarPosted Dec 25, 2018, 10:50 PM
Ehsan SajjadPosted Dec 25, 2018, 6:19 AM
mohammed IrshadPosted Dec 25, 2018, 6:05 AM
mohammed IrshadPosted Dec 25, 2018, 5:35 AM
Sreekanth ReddyPosted Dec 25, 2018, 4:20 AM