angularjs - IQueryable cannot implicity convert type using .single or .first -
public iqueryable<project> getprojectpid(int projectid) { return _ctx.projects.include("tenninehours").where(r => r.projectid == projectid).firstordefault(); }
i trying single result here not have use ng-repeat base single object project should return. have tried without .include well. or should filter result in controller. have made effort there without results. error cannot implicitly convert type 'tennineapp.data.project' 'system.linq.iqueryable'. explicit conversion exists (are missing cast)? new linq! still working on this. thanks,
because attempting return iqueryable of project. return single project object;
public project getprojectpid(int projectid) { return _ctx.projects.include("tenninehours") .firstordefault(r => r.projectid == projectid); }
Comments
Post a Comment