public List <HastaneDTO> Get() { using (HastaneRepository hastaneRepo = new HastaneRepository()) { var model = hastaneRepo.Get(x => x.HastaneBolum, x => x.Doktor, x => x.Il, x => x.Ilce).ToList(); return(hastaneMapper.MapAll(model)); } }
public void Update(Hastane model) { using (HastaneRepository hastaneRepo = new HastaneRepository()) { try { hastaneRepo.Update(model); } catch { throw; } } }
public List <HastaneDTO> GetByLocation(int ilId, int ilceId) { using (HastaneRepository hastaneRepo = new HastaneRepository()) { try { var model = hastaneRepo.GetByFilter(x => x.ilceID == ilceId && x.ilID == ilId, x => x.HastaneBolum, x => x.Doktor, x => x.Il, x => x.Ilce).ToList(); return(hastaneMapper.MapAll(model)); } catch { throw; } } }
public HastaneDTO GetById(int id) { using (HastaneRepository hastaneRepo = new HastaneRepository()) { try { var ent = hastaneRepo.GetById(x => x.hastaneID == id, x => x.Il, x => x.Ilce, x => x.HastaneBolum, x => x.Doktor); return(hastaneMapper.Map(ent)); } catch { throw; } } }
public override Result Sil(Hastane entity) { HastaneRepository temp = new HastaneRepository(); Result result = new Result(); try { temp.Sil(entity); result.HataYok(); return(result); } catch (Exception) { result.HataVar(); return(result); } }
public void Delete(int id) { using (HastaneRepository hastaneRepo = new HastaneRepository()) { try { var model = hastaneRepo.GetById(x => x.hastaneID == id, x => x.Doktor, x => x.HastaneBolum, x => x.Il, x => x.Ilce); HastaneBolumBLL hastanebolBusiness = new HastaneBolumBLL(); hastanebolBusiness.DeleteByHastane(model.HastaneBolum.ToList()); hastaneRepo.Delete(id); } catch { throw; } } }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; // var dbPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "proje.db"); var dbPath = Path.Combine(System.Environment.GetFolderPath (System.Environment.SpecialFolder.Personal), "proje.db"); ISorularRepository sorularRepository = new SorularRepository(dbPath); IKullaniciRepository kullaniciRepository = new KullaniciRepository(dbPath); IHastaneRepository hastaneRepository = new HastaneRepository(dbPath); IDoktorRepository doktorRepository = new DoktorRepository(dbPath); IHemsireRepository hemsireRepository = new HemsireRepository(dbPath); IOdaRepository odaRepository = new OdalarRepository(dbPath); IKoridorRepository koridorRepository = new KoridorRepository(dbPath); INesneRepository nesneRepository = new NesneRepository(dbPath); base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App(sorularRepository, kullaniciRepository, hastaneRepository, doktorRepository, hemsireRepository, odaRepository, koridorRepository, nesneRepository)); }
public List <Hastane> HastaneGetir(int ID, bool eklenecekMi) { HastaneRepository temp = new HastaneRepository(); return(temp.HastaneGetir(ID, eklenecekMi)); }