public bool AddFotoLeilao(FotoForCreationDto fotoForCreationDto, Cloudinary cloudinary) { var fotoId = _fotoService.AddFotoLeilao(fotoForCreationDto, cloudinary); var leilao = _leilaoRepository.Find(x => x.Id == fotoForCreationDto.LeilaoId).FirstOrDefault(); if (leilao != null) { leilao.FotoId = fotoId; _leilaoRepository.Update(leilao); if (Commit()) { return(true); } } return(false); }