Skip to content

Commit 2e14c2e

Browse files
Copilotwadepickett
andauthored
Fix inconsistent lambda parameter in DepartmentsController Edit snippets (#36796)
* Initial plan * Fix inconsistent lambda parameter names in DepartmentsController Edit methods Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> * Delete .nuget/nuget.exe The .nuget/nuget.exe that has nothing to do with the lambda parameter consistency fix, removing. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> Co-authored-by: Wade Pickett <wpickett@microsoft.com>
1 parent 3d75bee commit 2e14c2e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

aspnetcore/data/ef-mvc/intro/samples/cu/Controllers/DepartmentsController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public async Task<IActionResult> Edit(int? id)
110110

111111
// <snippet_EagerLoading>
112112
var department = await _context.Departments
113-
.Include(i => i.Administrator)
113+
.Include(d => d.Administrator)
114114
.AsNoTracking()
115115
.FirstOrDefaultAsync(m => m.DepartmentID == id);
116116
// </snippet_EagerLoading>
@@ -135,7 +135,7 @@ public async Task<IActionResult> Edit(int? id, byte[] rowVersion)
135135
return NotFound();
136136
}
137137

138-
var departmentToUpdate = await _context.Departments.Include(i => i.Administrator).FirstOrDefaultAsync(m => m.DepartmentID == id);
138+
var departmentToUpdate = await _context.Departments.Include(d => d.Administrator).FirstOrDefaultAsync(m => m.DepartmentID == id);
139139

140140
if (departmentToUpdate == null)
141141
{

0 commit comments

Comments
 (0)