public void HavaleVirman(int aliciHesapNo, int gonderenHesapNo, decimal tutar) { using (HesapRepository hesapRepo = new HesapRepository()) { try { var alici = hesapRepo.GetById(x => x.hesapNo == aliciHesapNo, x => x.Musteri, x => x.AcilisPlatformu); alici.bakiye += tutar; hesapRepo.Update(alici); var gonderen = hesapRepo.GetById(x => x.hesapNo == gonderenHesapNo, x => x.Musteri, x => x.AcilisPlatformu); gonderen.bakiye -= tutar; hesapRepo.Update(gonderen); } catch { throw; } } }
public HesapDTO GetById(int id) { using (HesapRepository hesapRepo = new HesapRepository()) { try { var model = hesapRepo.GetById(x => x.hesapNo == id, x => x.Musteri, x => x.AcilisPlatformu); return(hesapMapper.Map(model)); } catch { throw; } } }
public void ParaIslem(int hesapNo, decimal tutar) { using (HesapRepository hesapRepo = new HesapRepository()) { try { var model = hesapRepo.GetById(x => x.hesapNo == hesapNo, x => x.Musteri, x => x.AcilisPlatformu); model.bakiye += tutar; hesapRepo.Update(model); } catch { throw; } } }