public RandevuDTO GetById(int id) { using (RandevuRepository randevuRepo = new RandevuRepository()) { try { var ent = randevuRepo.GetById(x => x.randevuID == id, x => x.Doktor, x => x.Kullanici, x => x.Kullanici.KullaniciBilgileri, x => x.Doktor.Bolum, x => x.Doktor.Hastane); return(randevuMapper.Map(ent)); } catch { throw; } } }
public void Delete(int randevuId) { using (RandevuRepository randevuRepo = new RandevuRepository()) { try { var model = randevuRepo.GetById(x => x.randevuID == randevuId, x => x.Doktor, x => x.Kullanici, x => x.Doktor.Bolum, x => x.Doktor.Hastane); model.durum = false; randevuRepo.Update(model); } catch { throw; } } }