public async Task <bool> ApprovePhoto(int id) { var photo = await _dataAccess.GetPhoto(id); photo.IsApproved = true; if (await _dataAccess.SaveAll()) { return(true); } return(false); }
public async Task <PhotoForReturnDto> GetPhoto(int id) { var photo = await _dataContext.GetPhoto(id); return(_mapper.Map <PhotoForReturnDto>(photo)); }