We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 083dd58 + f0bfd80 commit d247434Copy full SHA for d247434
NorthwindCRUD/Services/EmployeeService.cs
@@ -28,7 +28,9 @@ public IQueryable<EmployeeDb> GetAllAsQueryable()
28
29
public EmployeeDb? GetById(int id)
30
{
31
- return this.dataContext.Employees.FirstOrDefault(c => c.EmployeeId == id);
+ return this.dataContext.Employees
32
+ .Include(x => x.Address)
33
+ .FirstOrDefault(c => c.EmployeeId == id);
34
}
35
36
public EmployeeDb[] GetEmployeesByReportsTo(int id)
0 commit comments