using AutoMapper; using MyOffice.Core; namespace MyOffice.Services; public static class AutomapperExtensions { public static List ToDto(this IEnumerable list, IMapper mapper) { return mapper.Map>(list); } public static TTo ToDto(this IDataModel item, IMapper mapper) { return mapper.Map(item); } }