TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mohammed Irshad
1.5k
262
4.1k
Web Api Controller issue
Dec 25 2018 3:50 AM
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;
}
}
}
Error:sickleavegetdata = dc.B_HIS_Demog_Pat_Mstr.OrderBy(a => a.Pat_MR).ToList();
Reply
Answers (
8
)
Validator control
Autopostback For Button