Linq到SQL左转外部联接
LEFT OUTER
//assuming that I have a parameter named 'invoiceId' of type intfrom c in SupportCaseslet invoice = c.Invoices.FirstOrDefault(i=> i.Id == invoiceId)where (invoiceId == 0 || invoice != null) select new { Id = c.Id , InvoiceId = invoice == null ? 0 : invoice.Id}
翻翻过去那场雪
凤凰求蛊