string idVariable = "qwerty";
string sqlQuery = "select id from user where id = @id";
sqlCommand.Parameters.Add("@id", SqlDbType.VarChar).Value = idVariable;
Adding a value for a specific field is ok.
What if I need to have a few ids and IN in WHERE clause?
List<string> ids = new List<string>{"qwe", "asd", "zxc"};
string sqlQuery = "select id from user where id IN @ids";
sqlCommand.Parameters.Add("@ids", SqlDbType.???).Value = ids;