In my code I have this everywhere
command.Parameters.Add("@name", DbType.String).Value = name;
Is there an easier way? I would love to do something like
command.command.CommandTextFn("insert into tbl(key,val) values(?, ?);", key, value);
and have it figure out if the key/value is a string or int. I wouldn't mind if I had to use {0}
instead of ?