public void Add(Il model) { using (IlRepository ilRepo = new IlRepository()) { try { ilRepo.Add(model); } catch { throw; } } }
public List <IlDTO> Get() { using (IlRepository ilRepo = new IlRepository()) { try { var model = ilRepo.Get(x => x.Hastane, x => x.KullaniciBilgileri).ToList(); return(ilmapper.MapAll(model)); } catch { throw; } } }
public IlDTO GetById(int id) { using (IlRepository ilRepo = new IlRepository()) { try { var model = ilRepo.GetById(x => x.ilID == id, x => x.Hastane, x => x.KullaniciBilgileri); return(ilmapper.Map(model)); } catch { throw; } } }
public IlService() { _ilRepository = new IlRepository(); }
public IlController(IlRepository _ilrep) { ilRep = _ilrep; }