Esempio n. 1
0
        public async Task <bool> ApprovePhoto(int id)
        {
            var photo = await _dataAccess.GetPhoto(id);

            photo.IsApproved = true;

            if (await _dataAccess.SaveAll())
            {
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
        public async Task <PhotoForReturnDto> GetPhoto(int id)
        {
            var photo = await _dataContext.GetPhoto(id);

            return(_mapper.Map <PhotoForReturnDto>(photo));
        }