コード例 #1
0
        public async Task Save(NewPostData newPost)
        {
            var url = await cloudStorageService.SaveFile(newPost.Image, CONTAINER_NAME);

            await postRepository.SaveAsync(new Post
            {
                Image   = new Image(url),
                Message = newPost.Message,
                Author  = userService.GetLoggedUser()
            });
        }
コード例 #2
0
        public async Task SaveAsync(NewUserData newUser)
        {
            var url = await cloudStorageService.SaveFile(newUser.Image, CONTAINER_NAME);

            await userRepository.SaveAsync(new User
            {
                Email    = newUser.Email,
                Image    = new Image(url),
                Name     = newUser.Name,
                Password = CriptoHelper.encrypt(newUser.Password),
            });
        }