Skip to content

Commit 6691b72

Browse files
Fix left outer join - null reference exception issue (#46939)
fixes #46938
1 parent bdbabfc commit 6691b72

File tree

1 file changed

+1
-1
lines changed
  • docs/csharp/linq/standard-query-operators/snippets/standard-query-operators

1 file changed

+1
-1
lines changed

docs/csharp/linq/standard-query-operators/snippets/standard-query-operators/LeftOuterJoins.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private static void LeftOuterJoinMethodSyntax()
4848
{
4949
student.student.FirstName,
5050
student.student.LastName,
51-
Department = department.Name
51+
Department = department?.Name ?? string.Empty
5252
});
5353

5454
foreach (var v in query)

0 commit comments

Comments
 (0)