public new IDomainObject VratiObjekat(SqlDataReader reader) { try { Carinik company = new Carinik(); while (reader.Read()) { company.Id = (long)reader[0]; company.NazivKompanije = reader[1].ToString(); break; } return(company); } catch (Exception) { return(null); } }
public new List <IDomainObject> VratiListu(SqlDataReader reader) { try { List <IDomainObject> companies = new List <IDomainObject>(); while (reader.Read()) { Carinik company = new Carinik { Id = (long)reader[0], NazivKompanije = reader[1].ToString() }; companies.Add(company); } return(companies); } catch (Exception) { return(null); } }