using AutoMapper; using Galaeth.Core.Dtos; using Galaeth.Core.Entities; using Galaeth.Services.Dtos; namespace Galaeth.Services.Profiles; /// /// Profile for AutoMapper. /// public class AutomapperProfile : Profile { /// /// Initializes a new instance of the class. /// public AutomapperProfile() { CreateMap() .ForMember(dest => dest.RegistrationDate, opt => opt.MapFrom(src => src.CreatedAt)) .ForMember(dest => dest.RegistrationDateTicks, opt => opt.MapFrom(src => src.CreatedAt.Ticks)) .ForMember(dest => dest.RoleTitle, opt => opt.MapFrom(src => src.Role.ToString())); } }