Files
TP-Fluent/BookHive/MappingProfiles/EntityToDtoMappings.cs
2026-03-09 22:09:10 +01:00

28 lines
691 B
C#

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<Book, GetBookDto>();
CreateMap<Book, GetBookDetailsDto>();
CreateMap<Author, GetAuthorDto>();
CreateMap<Author, GetAuthorDetailsDto>();
CreateMap<Loan, GetLoanDto>();
CreateMap<Member, GetMemberDto>();
CreateMap<Member, GetMemberDetailsDto>();
CreateMap<Review, GetReviewDto>();
}
}