private static Flow.FlowLogList BuildFlowLogList(MySqlCommand cmd) { Flow.FlowLogList result = new Flow.FlowLogList(); using (MySqlConnection cn = new MySqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString)) { cn.Open(); cmd.Connection = cn; using (MySqlDataReader dr = cmd.ExecuteReader()) { while (dr.Read()) { Flow.FlowLogListItem flowLogListItem = new Flow.FlowLogListItem(); YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(flowLogListItem, dr); sqlDataReaderPropertyWriter.WriteProperties(); result.Add(flowLogListItem); } } } return(result); }
private static Flow.FlowLogList BuildFlowLogList(SqlCommand cmd) { Flow.FlowLogList result = new Flow.FlowLogList(); using (SqlConnection cn = new SqlConnection(Properties.Settings.Default.ProductionConnectionString)) { cn.Open(); cmd.Connection = cn; using (SqlDataReader dr = cmd.ExecuteReader()) { while (dr.Read()) { Flow.FlowLogListItem flowLogListItem = new Flow.FlowLogListItem(); YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(flowLogListItem, dr); sqlDataReaderPropertyWriter.WriteProperties(); result.Add(flowLogListItem); } } } return result; }