added validators in project
This commit is contained in:
@@ -12,7 +12,13 @@ public class EntityToDtoMappings : Profile
|
||||
{
|
||||
public EntityToDtoMappings()
|
||||
{
|
||||
CreateMap<Book, GetBookDto>();
|
||||
CreateMap<Book, GetBookDto>()
|
||||
.ForMember(
|
||||
dest => dest.AuthorFullName,
|
||||
opt =>
|
||||
opt.MapFrom(src =>
|
||||
src.Author!.FirstName + " " + src.Author.LastName)
|
||||
);
|
||||
CreateMap<Book, GetBookDetailsDto>();
|
||||
|
||||
CreateMap<Author, GetAuthorDto>();
|
||||
|
||||
Reference in New Issue
Block a user