English 中文(简体)
获取数据时,先是掌握数据。
原标题:get data by linq but have Error when doit this

我是这样说的。

使用(t => (((衍生)t)。 MyProperty 或作为经营人(t =>); (t as Derived)。 MyProperty 。 可以通过堆肥场、骑自行车、骑自行车、天空或步行等进行过滤。 关于列入相关数据的更多信息,见

this my code

enter image description here

https://i.stack.imgur.com/MHh4w.png” rel=“nofollow noreferer”>。

https://i.stack.imgur.com/LE1A.png” rel=“nofollow noreferer”>。

i 想要获得雇员姓名

图像上的这条道路

TBEmployee Pc > TB Employee > EmployeeName(希望获得“EmployeeName”)

任何想法

问题回答

TBEmployeePc > TBEmployee > EmployeeName (i want get this "EmployeeName")

Try:

var pc=Octx.TBEmployeePc.Include(x=>x.TBEmployee).ToList();
var namelist = pc.Select(o => o.TBEmployee.Select(c => c.EmployeeName)).ToList();




相关问题
Using jquery to get a partial view and updating the UI

I need to render a partial view (returned from the controller) to show some customer summary details. This will need to happen when the user clicks on a button. In the the mean time the user can ...

MVC 2 / MVC 3 / MVC 4

MVC 2 我们可以轻松地创造领域。 现在,我的问题涉及nes地区(地区内)。

Asp.Net MVC 2 - Changing the PropertyValueRequired string

Using a resx file in the App_GlobalResources directory, I ve been able to change the default message for the PropertyValueInvalid string of the model validators. But it doesn t work to translate the ...

ASP.NET MVC 3 - What features do you want to see? [closed]

I know a bunch of people that are really enjoying the improvements that ASP.NET MVC 2 made over the first release. I have just started to migrate our MVC 1 project over and so far areas has totally ...

热门标签