public async Task <IActionResult> Donations_ReadAsync([DataSourceRequest] DataSourceRequest request) { var donations = await _Service.GetDonationsAsync(); DataSourceResult result = donations.ToDataSourceResult(request, donation => new DonationViewModel { Id = donation.Id, SponsorId = donation.SponsorId, DonationAmount = donation.DonationAmount, DonationDate = donation.DonationDate, DonationFor = donation.DonationFor, DonationType = donation.DonationType, PaymentCategory = donation.PaymentCategory, PaymentMethod = donation.PaymentMethod, Notes = donation.Notes, LastUpdated = donation.LastUpdated, LastUpdatedBy = donation.LastUpdatedBy, }); return(Json(result)); }