private YellowstonePathology.YpiConnect.Contract.Flow.MarkerCollection BuildMarkerCollection(SqlCommand cmd) { YellowstonePathology.YpiConnect.Contract.Flow.MarkerCollection markerCollection = new YellowstonePathology.YpiConnect.Contract.Flow.MarkerCollection(); using (SqlConnection cn = new SqlConnection(YpiConnect.Service.Properties.Settings.Default.ServerSqlConnectionString)) { cn.Open(); cmd.Connection = cn; using (SqlDataReader dr = cmd.ExecuteReader()) { while (dr.Read()) { YellowstonePathology.YpiConnect.Contract.Flow.Marker marker = new Contract.Flow.Marker(); YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter = new Business.Domain.Persistence.DataReaderPropertyWriter(dr); marker.WriteProperties(propertyWriter); markerCollection.Add(marker); } } } return(markerCollection); }
private YellowstonePathology.YpiConnect.Contract.Flow.MarkerCollection BuildMarkerCollection(SqlCommand cmd) { YellowstonePathology.YpiConnect.Contract.Flow.MarkerCollection markerCollection = new YellowstonePathology.YpiConnect.Contract.Flow.MarkerCollection(); using (SqlConnection cn = new SqlConnection(YpiConnect.Service.Properties.Settings.Default.ServerSqlConnectionString)) { cn.Open(); cmd.Connection = cn; using (SqlDataReader dr = cmd.ExecuteReader()) { while (dr.Read()) { YellowstonePathology.YpiConnect.Contract.Flow.Marker marker = new Contract.Flow.Marker(); YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter = new Business.Domain.Persistence.DataReaderPropertyWriter(dr); marker.WriteProperties(propertyWriter); markerCollection.Add(marker); } } } return markerCollection; }