Example #1
0
        public async Task AddUserPhoto(AddPhotoDto newPhoto)
        {
            await _addPhotoBusiness.AddPhoto(newPhoto);

            await _userPhotoRepository.UnitOfWork.Save();

            var photo = await _getPhotoBusiness.GetLastPhoto();

            await _userPhotoRepository.AddUserPhoto(new UserPhoto
            {
                PhotoId = photo.Id,
                UserId  = newPhoto.UserId
            });
        }
 public Response <UserPhotoViewModel> AddUserPhoto(UserPhotoViewModel userPhoto, bool isMyProfile)
 {
     return(_userPhotoRepository.AddUserPhoto(userPhoto, isMyProfile));
 }