Exemplo n.º 1
0
        public async Task <CreateMemberCommandResult> CreateMemberCommandHandler(CreateMemberCommand command)
        {
            var member          = _mapper.Map <Member>(command);
            var persistedMember = await _memberRepository.CreateRecordAsync(member);

            var vm = _mapper.Map <MemberVm>(persistedMember);

            return(new CreateMemberCommandResult()
            {
                Payload = vm
            });
        }