public static Member ToMember(this MemberServiceModel serviceModel) { var member = new Member(); member.InjectFrom(serviceModel); return(member); }
public async Task <MemberServiceModel> SaveMemberAsync(MemberServiceModel memberServiceModel) { Member member = await memberRepository .SaveAsync(memberServiceModel.Id, memberServiceModel.ToMember()); return(new MemberServiceModel(member)); }