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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -