public async Task <IApiResult> Handle(CreateMemberCommand command, CancellationToken cancellationToken)
        {
            var member = _factory.CreateMember(command.Name);

            member = await _memberRepository.InsertAsync(member, cancellationToken);

            return(new SuccessCreatedResult(member, command));
        }
Example #2
0
        public async Task <int> SaveMember(CreateMemberModel newMember)
        {
            var member = _modelFactory.CreateMember(newMember);

            return(await _memberDao.SaveMember(member).ConfigureAwait(false));
        }