End Google Ads 201810 - BS.net 01 --> Hi
i created a web service to load some information from sql server 2005 database, it works good but it has very low speed to return data, wheras sql server load data without overhead. i think the decreasing performance occures in while loop, here is my code :

[WebMethod]
public List GetAllInputOuts()
{
List list = new List();
using (System.Data.SqlClient.SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["IOXPConnectionString"].ConnectionString))
{
using (SqlCommand cmd = con.CreateCommand())
{
cmd.CommandText = "select * from vLinkToDataSource";
SqlDataReader dr = null;

if (con.State != ConnectionState.Open)
con.Open();
dr = cmd.ExecuteReader();

while (dr.Read())
{
InputOutput io = new InputOutput();
io.Code = dr.GetInt32(2);
io.Name = dr.GetString(1);
io.Family = dr.GetString(0);
io.DateInput = dr.GetString(3);
io.TimeInput = dr.GetString(4);
io.DateOutput = dr.GetString(5);
io.TimeOutput = dr.GetString(6);
list.Add(io);
}

}
}
return list;
}

how to improve the performance ?
Note 1 : the sql server 2005 return results good.
Note 2 : almost 17000 records exists in database.
Note 3 : beacuse i want to use this web Service in sharepoint, i must return result as List.
Any help would be great appreciated