Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

Lambda parameters throughout the codebase use single letters (s, c, r, e) making LINQ queries difficult to scan and understand at a glance.

Changes

  • Repository layer: Replaced all single-letter lambda parameters in LINQ queries
    • sstudent in StudentRepository
    • ccourse in CourseRepository
    • rregistration in RegistrationRepository
  • DbContext: Updated Entity Framework model configuration lambdas
  • Service layer: Updated lambdas in StudentService, CourseService, CertificateService
  • Domain entities: Updated computed property lambdas (e.g., CurrentEnrollment)

Example

Before:

return await _dbSet
    .Include(s => s.Registrations)
        .ThenInclude(r => r.Course)
    .Where(s => s.IsActive)
    .FirstOrDefaultAsync(s => s.StudentId == studentId);

After:

return await _dbSet
    .Include(student => student.Registrations)
        .ThenInclude(registration => registration.Course)
    .Where(student => student.IsActive)
    .FirstOrDefaultAsync(student => student.StudentId == studentId);

8 files modified, zero functional changes.

Original prompt

Suggest more descriptive variable and function names


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Hemavathi15sg <224925058+Hemavathi15sg@users.noreply.github.com>
Copilot AI changed the title [WIP] Update variable and function names for clarity Replace single-letter lambda parameters with descriptive names Nov 19, 2025
Copilot AI requested a review from Hemavathi15sg November 19, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant