first commit
This commit is contained in:
30
BookHive/MappingProfiles/DtoToEntityMappings.cs
Normal file
30
BookHive/MappingProfiles/DtoToEntityMappings.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
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 DtoToEntityMappings : Profile
|
||||
{
|
||||
public DtoToEntityMappings()
|
||||
{
|
||||
CreateMap<CreateBookDto, Book>();
|
||||
CreateMap<UpdateBookDto, Book>();
|
||||
|
||||
CreateMap<CreateAuthorDto, Author>();
|
||||
CreateMap<UpdateAuthorDto, Author>();
|
||||
|
||||
CreateMap<CreateMemberDto, Member>();
|
||||
CreateMap<UpdateMemberDto, Member>();
|
||||
|
||||
CreateMap<CreateReviewDto, Review>();
|
||||
CreateMap<UpdateReviewDto, Review>();
|
||||
|
||||
CreateMap<CreateLoanDto, Loan>();
|
||||
CreateMap<UpdateLoanDto, Loan>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user