Linq Entity Framework returning the value but not display

ε祈祈猫儿з 提交于 2019-12-13 07:57:17

问题


Linq Entity Framework return the value but not displaying

mod = pron.Module.Include(x => x.Project).SingleOrDefault(x => x.ProjectId == id);

value get but not displaying


回答1:


I do not really understand your question but I think you want somethink like

pron.Module.Where(x => x.ProjectId == id).Include(x => x.Project).FirstOrDefault();



来源:https://stackoverflow.com/questions/56981798/linq-entity-framework-returning-the-value-but-not-display

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!