Example #1
0
 public List <IlceDTO> GetByIlId(int id)
 {
     using (IlceRepository ilceRepo = new IlceRepository())
     {
         try
         {
             var model = ilceRepo.GetByFilter(x => x.ilID == id, x => x.Hastane, x => x.KullaniciBilgileri).ToList();
             return(ilceMapper.MapAll(model));
         }
         catch
         {
             throw;
         }
     }
 }
Example #2
0
 public List <IlceDTO> Get()
 {
     using (IlceRepository ilceRepo = new IlceRepository())
     {
         try
         {
             var model = ilceRepo.Get(x => x.Il, x => x.Hastane, x => x.KullaniciBilgileri).ToList();
             return(ilceMapper.MapAll(model));
         }
         catch
         {
             throw;
         }
     }
 }
Example #3
0
 public IlceDTO GetById(int id)
 {
     using (IlceRepository ilceRepo = new IlceRepository())
     {
         try
         {
             var model = ilceRepo.GetById(x => x.ilceID == id, x => x.Il, x => x.Hastane, x => x.KullaniciBilgileri);
             return(ilceMapper.Map(model));
         }
         catch
         {
             throw;
         }
     }
 }
Example #4
0
 public IlceController(IlceRepository _ilceRep, IMapper _map)
 {
     map     = _map;
     ilceRep = _ilceRep;
 }