public DomenskiObjekat GetEntity(SqlDataReader reader) { Sastanak s = new Sastanak(); while (reader.Read()) { s.SastanakID = reader.GetInt32(0); s.DatumIVremeSastanka = reader.GetDateTime(1); s.Advokat = new Advokat { ImeAdvokata = reader.GetString(2) }; s.Klijent = new Klijent { ImeKlijenta = reader.GetString(3) }; } return(s); }
public List <DomenskiObjekat> GetEntities(SqlDataReader reader) { List <DomenskiObjekat> list = new List <DomenskiObjekat>(); while (reader.Read()) { Sastanak s = new Sastanak { SastanakID = reader.GetInt32(0), DatumIVremeSastanka = reader.GetDateTime(1), Advokat = new Advokat { ImeAdvokata = reader.GetString(2) }, Klijent = new Klijent { ImeKlijenta = reader.GetString(3) } }; list.Add(s); } return(list); }