Challenge 1: A Return() Method Using LINQ to Find the Loan First — Possible Solution ==================================================================== Repository.cs (extended): public class Repository { private readonly List _items = new(); public void Add(T item) => _items.Add(item); public IEnumerable All() => _items; public IEnumerable Where(Func predicate) => _items.Where(predicate); public void Remove(T item) => _items.Remove(item); } Program.cs: var loans = new Repository(); loans.Add(new Loan("001", "Alice", DateTime.Now.AddDays(7))); loans.Add(new Loan("002", "Bob", DateTime.Now.AddDays(3))); loans.Add(new Loan("003", "Carol", DateTime.Now.AddDays(-1))); static void ReturnLoan(Repository loans, string isbn, string borrower) { var loan = loans.Where(l => l.Isbn == isbn && l.Borrower == borrower).FirstOrDefault(); if (loan != null) { loans.Remove(loan); Console.WriteLine($"Returned: {loan}"); } } ReturnLoan(loans, "002", "Bob"); foreach (var loan in loans.All()) Console.WriteLine(loan); Output: Returned: Loan { Isbn = 002, Borrower = Bob, DueDate = ... } Loan { Isbn = 001, Borrower = Alice, DueDate = ... } Loan { Isbn = 003, Borrower = Carol, DueDate = ... } Explanation: ReturnLoan uses Repository's own Where() (itself calling LINQ's real Where() underneath, per csharp2-2/csharp2-7) to locate the specific Loan record matching both isbn and borrower, then removes exactly that record instance. Records compare by value (per csharp2-5), so Remove() correctly identifies the matching record even though it's a different object reference than the one originally added, as long as every field matches. WHY THIS WORKS AS AN ANSWER ------------------------------ This uses the repository's own LINQ-backed Where() to find the correct loan before removing it, demonstrating the generic Repository and LINQ working together exactly as the capstone's own Repository.Where() method is designed to be used.