コード例 #1
0
 public CreateBookCommandHandler(BookEditorContext context)
 {
     _context = context;
     _mapper  = new MapperConfiguration(cfg =>
     {
         cfg.CreateMap <Domain.Book, BookDto>().ReverseMap();
         cfg.CreateMap <Domain.Author, AuthorDto>().ReverseMap();
     }).CreateMapper();
 }
コード例 #2
0
        public GetBooksQueryHandler(BookEditorContext context)
        {
            _context = context;

            _mapper = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <Domain.Author, IdentityAuthorDto>();
                cfg.CreateMap <Domain.Book, IdentityBookDto>();
            }).CreateMapper();
        }
コード例 #3
0
 public DeleteBookCommandHandler(BookEditorContext context)
 {
     _context = context;
 }
コード例 #4
0
 public ReplaceAuthorCommandHandler(BookEditorContext context)
 {
     _context = context;
 }
コード例 #5
0
 public CreateAuthorCommandHandler(BookEditorContext context)
 {
     _context = context;
 }