左连接Linq到实体的Vb.net

我无法弄清楚linq到实体查询语法。我的问题是,如果Calls表的值为null然后出现注释,我想做一些类似于左连接的东西来从Calls表中获取'all'行。 我试图将它分组,但我无法弄清楚写它的正确方法。
Dim TicketQuery As ObjectQuery = From c In EnData.Customer _
                                         Join t In EnData.Calls On t.CustomerID Equals c.CustomerID _
                                         Join Status In EnData.Lists On t.Status Equals Status.ListValue _
                                         Join Project In EnData.Lists On t.Project Equals Project.ListValue _
                                         Join Priorty In EnData.Lists On t.Priority Equals Priorty.ListValue _
                                         Where c.Status > -1 And t.Status > -1 And Status.ListType = 1 And Project.ListType = 3 And Priorty.ListType = 2 _
         Select New With {c.CustName, t.CallID, t.CallDate, t.CallTime, t.Description, Key .Status = Status.ListText, Key .Project = Project.ListText, t.DateModified, Key .Priority = Priorty.ListText}
我该如何解决这个问题?     
已邀请:
类似的问题:Linq to Sql:多个左外连接 Microsoft文档:http://msdn.microsoft.com/en-us/library/bb918093.aspx#Y916 LINQ示例来自:http://msdn.microsoft.com/en-us/vbasic/bb737909 左外连接 可以用组连接表示所谓的外连接。左外连接类似于交叉连接,除了所有左侧元素至少包含一次,即使它们与任何右侧元素都不匹配。请注意即使没有匹配的产品,蔬菜也会出现在输出中。
Public Sub Linq105()
    Dim categories() = {"Beverages", "Condiments", "Vegetables", "Dairy Products", "Seafood"}

Dim productList = GetProductList()

Dim query = From c In categories _
            Group Join p In productList On c Equals p.Category Into Group _
            From p In Group.DefaultIfEmpty() _
            Select Category = c, ProductName = If(p Is Nothing, "(No products)", p.ProductName)

For Each v In query
    Console.WriteLine(v.ProductName + ": " + v.Category)
Next
End Sub
    
对于VB.net中的左连接,我们可以使用Let
Dim q = 
    (From item In _userProfileRepository.Table
     Let Country = (From p In _countryRepository.Table Where p.CountryId = item.CurrentLocationCountry Select p.Name).FirstOrDefault
     Let State = (From p In _stateRepository.Table Where p.CountryId = item.CurrentLocationCountry Select p.Name).FirstOrDefault
     Let City = (From p In _stateRepository.Table Where p.CountryId = item.CurrentLocationCountry Select p.Name).FirstOrDefault
    Where item.UserId = item.ProfileId.ToString)
在左连接之后我们可以使用group by
Dim q2 = 
    (From p In q Group p By p.Country, p.State, p.City Into Group 
     Select New With 
         {
             .Country = Country, 
             .State = State, 
             .City = City, 
             .Count = Group.Count
         }).ToList()
    

要回复问题请先登录注册