コード例 #1
0
 public KullaniciDTO GetByUsername(string username)
 {
     using (KullaniciRepository kullaniciRepo = new KullaniciRepository())
     {
         try
         {
             var ent          = kullaniciRepo.GetByUsername(username);
             var kullanicidto = new KullaniciDTO();
             kullanicidto.adi         = ent.adi;
             kullanicidto.kullaniciID = ent.kullaniciID;
             kullanicidto.password    = ent.password;
             kullanicidto.rol         = ent.Rol.rol1;
             kullanicidto.rolID       = ent.rolID;
             kullanicidto.sirketAdi   = ent.Sirket.sirketAdi;
             kullanicidto.sirketID    = ent.sirketID;
             kullanicidto.soyadi      = ent.soyadi;
             kullanicidto.username    = ent.username;
             return(kullanicidto);
         }
         catch (Exception ex)
         {
             throw;
         }
     }
 }