public async Task ApproveDonation(Guid id) { var donationAsync = await DonationRepository.GetWhereAsync(p => p.Id == id); var donation = donationAsync.FirstOrDefault(); if (donation == null) { throw new Exception($"Donation id ${id} was not found"); } if (donation.Total > 0) { throw new Exception($"Online donation cannot be canceled by this function"); } donation.Canceled = false; donation.Completed = true; this.DonationRepository.Udate(donation); await this.DonationRepository.SaveAsync(); }