using AutoMapper; using BookHive.DTO.Author; using BookHive.DTO.Book; using BookHive.DTO.Loan; using BookHive.DTO.Member; using BookHive.DTO.Review; using BookHive.Models; namespace BookHive.MappingProfiles; public class EntityToDtoMappings : Profile { public EntityToDtoMappings() { CreateMap() .ForMember( dest => dest.AuthorFullName, opt => opt.MapFrom(src => src.Author!.FirstName + " " + src.Author.LastName) ); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); } }