示例#1
0
 public IDomainObject VratiObjekat(SqlDataReader reader)
 {
     try
     {
         Banka bank = new Banka();
         while (reader.Read())
         {
             bank.Id    = (long)reader[0];
             bank.Naziv = reader[1].ToString();
             break;
         }
         return(bank);
     }
     catch (Exception)
     {
         return(null);
     }
 }
示例#2
0
 public List <IDomainObject> VratiListu(SqlDataReader reader)
 {
     try
     {
         List <IDomainObject> banks = new List <IDomainObject>();
         while (reader.Read())
         {
             Banka bank = new Banka
             {
                 Id    = (long)reader[0],
                 Naziv = reader[1].ToString()
             };
             banks.Add(bank);
         }
         return(banks);
     }
     catch (Exception)
     {
         return(null);
     }
 }