What I am trying to do is create generic execute functions that I can call and pass the query so I dont have to constantly write each over and over
public void ExecuteSql(string sqlStr)
using (SqlConnection con = new SqlConnection(globalconnStr))
using (SqlCommand cmd = new SqlCommand(sqlStr, con))
cmd.CommandType = CommandType.Text;
cmd.CommandText = sqlStr;
create a method add the query and call the needed method like ExecuteSql(sqlStr);
Is there any way to do that for a generic reader, dataset etc.