4 ms·
Into anonymous types mostly, where you can't pass the type to another method. Example: .Select(x => new { Name = x.Name, DepartmentName = x.Department.Name
by progmetaldev 2y ago
Into anonymous types mostly, where you can't pass the type to another method. Example:
.Select(x => new { Name = x.Name, DepartmentName = x.Department.Name }).ToList();
Same code as I wrote, except capture in an anonymous type. The documentation practically encourages this.