28 lines
691 B
C#
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>();
|
|
}
|
|
} |