public void OnGet(int id) { DonationCauseObj = new Models.Models.DonationCause(); DonationCauseObj = _unitOfWork.DonationCause.GetFirstOrDefault(c => c.Id == id); DonationDetailsList = _unitOfWork.DonationDetails.GetAll(c => c.DonationCauseId == DonationCauseObj.Id); foreach (var DonationDetails in DonationDetailsList) { DonationCauseObj.GoalProgress += DonationDetails.DonationTotal; } }
public IActionResult OnPostWire() { Models.Models.DonationCause DonationCauseFromDb = _unitOfWork.DonationCause.GetFirstOrDefault(c => c.Id == DonationCauseObj.Id); return(RedirectToPage("DonationPaymentWire", new { id = DonationCauseFromDb.Id })); }