public dsUser UserByID(int id) { dsUser tempDS = new dsUser(); SqlConnection connection = new SqlConnection( Configuration.GetValue("DSN")); connection.Open(); SqlCommand command = new SqlCommand(); command.CommandText = "FindUserByID"; command.CommandType = CommandType.StoredProcedure; command.Connection = connection; SqlParameterCollection parameters = command.Parameters; DbUtility.AddParameter(parameters, SqlDbType.Int, 50, "@id", id); SqlDataAdapter da = new SqlDataAdapter(command); da.Fill(tempDS); connection.Close(); return(tempDS); }