public async Task RemoveDonationAsync(Donation donation) { await Doc.Collection("Donations").Document(donation.UID).DeleteAsync(); Amount -= donation.Amount; await Doc.UpdateAsync(new { Amount }); }
public async Task AddDonationAsync(Donation donation) { await Doc.Collection("Donations").AddAsync(donation); Amount += donation.Amount; await Doc.UpdateAsync(new { Amount }); }