internal static List <IndustryDto> GetIndustryList(SqlConnection connection) { SqlCommand cmdApplicant = Repository.GetSQLCommand(StoredProcedure.SP_p_tbl_LookupIndustry_retrieve_all, connection); cmdApplicant.ExecuteNonQuery(); string password = string.Empty; List <IndustryDto> industries = null; using (SqlDataReader tempDataReader = cmdApplicant.ExecuteReader()) { if (tempDataReader.HasRows) { industries = new List <IndustryDto>(); while (tempDataReader.Read()) { var ind = new IndustryDto(); ind.IndustryId = Convert.ToInt32(tempDataReader["IndustryId"]); ind.IndustryName = tempDataReader["IndustryName"].ToString(); industries.Add(ind); } } } return(industries); }