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() }); }
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), }); }