public async Task <IActionResult> GetOverallBloodVolume() { var pesel = GetPeselFromRequest(Request); var bloodVolumeDonatedByDonor = (await bloodDonationService.GetAllAsync()) .Where(x => x.Donor.Pesel == pesel) .Sum(x => x.Volume); return(Ok(bloodVolumeDonatedByDonor)); }
public async Task <IActionResult> GetAllBloodDonations() { IEnumerable <BloodDonationDTO> allBloodDonations = await bloodDonationService.GetAllAsync(); return(Ok(allBloodDonations)); }