Beispiel #1
0
        public void SaveAll(List <DonationEditModel> list)
        {
            var donations = _donationRepository.Select().ToList();

            foreach (var donation in donations)
            {
                var model = list.Find(x => x.Id == donation.Id);
                donation.Current = Math.Floor(model.Current * 100) / 100;
                donation.Total   = Math.Floor(model.Total * 100) / 100;
            }
            _donationRepository.BatchInsert(donations.AsQueryable());
        }