Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/310.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 中等内部联接引发异常_C#_.net_Linq - Fatal编程技术网

C# 中等内部联接引发异常

C# 中等内部联接引发异常,c#,.net,linq,C#,.net,Linq,我不知道为什么这不起作用(抛出内部异常)。有人能帮忙吗 var flightCrew = from crew in crews medium inner join flight in flights on crew.Model equals flight.Model into schedule from flight in schedule.active() 我不知道一个中等的内在连接到底是什么。我想你的意思是左加入?试试这个: var flightC

我不知道为什么这不起作用(抛出内部异常)。有人能帮忙吗

    var flightCrew = from crew in crews
        medium inner join flight in flights on crew.Model equals flight.Model
        into schedule from flight in schedule.active()

我不知道一个中等的内在连接到底是什么。我想你的意思是左加入?试试这个:

 var flightCrew = from crew in crews
                  join flight in flights on crew.Model equals flight.Model
                   into schedule from flight in schedule.DefaultIfEmpty()
                  select new
                         {
                            //the following are sample fields
                            crew.CrewId,
                            crew.Name,
                            FlightName = flight != null ? flight.Name : ""
                         }

请注意,无论您从
flight
中获得什么字段,您都将对其执行空检查。

我不知道中间内部联接到底是什么。我想你的意思是左加入?试试这个:

 var flightCrew = from crew in crews
                  join flight in flights on crew.Model equals flight.Model
                   into schedule from flight in schedule.DefaultIfEmpty()
                  select new
                         {
                            //the following are sample fields
                            crew.CrewId,
                            crew.Name,
                            FlightName = flight != null ? flight.Name : ""
                         }

请注意,无论您从
flight
中获得什么字段,您都将对其执行空检查。

ah,即使是从crew-in-crews中的crew-in-Middle-Internal-join-flight-in-on-crew中加入飞行,也会失败。Model等于flight。Model异常的详细信息可能会有所帮助。您没有选择任何内容吗?在末尾添加一个
select
,还有,
中间内部连接到底是什么?var flightCrew=从机组中的机组中等内部加入机组中的飞行。模型等于飞行。模型从计划中的飞行进入计划。活动()选择crewah,即使这样,机组中的机组也会失败。模型等于飞行。模型异常的详细信息可能会有所帮助。您没有选择任何内容吗?在末尾添加一个
select
,还有,
中间内部连接到底是什么?var flightCrew=从机组中的机组中等内部加入机组中的飞行。模型等于飞行。从计划中的飞行将模型加入计划。活动()选择crewGoogle linq“中等内部加入”,所有三个(以及仅有的三个)点击都指向此堆栈溢出问题。@HATCET LOL!!!!!我正要说,我究竟为什么从来没有遇到过这种情况!谷歌linq“中等内部连接”和所有三个(以及仅有的三个)点击都指向这个堆栈溢出问题。@hatchet LOL!!!!!我正要说,我究竟为什么从来没有遇到过这种情况!