Skip to content

Commit e717003

Browse files
Fix left outer join - null reference exception issue
fixes #46938
1 parent 8adada3 commit e717003

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)