Collection Mapping Example

ℹ️ Description: AutoMapper can map entire collections in one call.

Employee List (3 items)

Id Name Email Department
1 John Doe john@example.com IT
2 Jane Smith jane@example.com HR
3 Bob Johnson bob@example.com Sales
💻 Code Used
// Create a list of employees
var employees = new List<Employee> { ... };

// Map entire collection in one call
var employeeDTOs = _mapper.Map<List<EmployeeDTO>>(employees);

// AutoMapper handles each item automatically!