public async Task<bool> Handle(CreateProfileCommand request, CancellationToken cancellationToken)
        {
            var newProfileEntity = _mapper.Map<CreateProfileCommand, ProfileEntity>(request);
            newProfileEntity.PartitionKey = request.UserId;
            var profileId = Guid.NewGuid();
            newProfileEntity.RowKey = profileId.ToString();

            var addResponse = await _profileRepository.AddUserProfile(newProfileEntity);
            return addResponse;
        }
Exemple #2
0
        public async Task <bool> AddUserProfile(Guid userId, UserProfile profile)
        {
            var newProfileEntity = _mapper.Map <UserProfile, ProfileEntity>(profile);

            newProfileEntity.PartitionKey = userId.ToString();
            var profileId = Guid.NewGuid();

            newProfileEntity.RowKey = profileId.ToString();
            profile.Id = profileId;
            var addResponse = await _profileRepository.AddUserProfile(newProfileEntity);

            return(addResponse);
        }