Mid LINQ

Convert to dictionary with Id and Name?

Convert to dictionary with Id and Name

var idNameDict = employees.ToDictionary(e => e.Id, e => e.Name);

More from LINQ Tutorial

All questions for this course