Safest way using Parameters Add with Value with Insert and Update in same query : I want to insert into sql and after that to update current table. 
Till now i was made that with one query

    example

    SqlCommand cmd = new SqlCommand(Insert into CustomerTrans (Active) values @Active;Update Customers set Active=MyClass.Active,con);
      cmd.ExecuteNonQuery();

So i want to handle this two queries together but also using parameters add with value.

I dont know how can i handle update query in Parameters...Is right the example below?

 

     SqlCommand cmd = new SqlCommand(Insert into CustomerTrans (Active) values @Active;Update Customers set Active=@Active2,con);
      cmd.Parameters.AddWithValue("@Active",1)
      cmd.Parameters.AddWithValue("@Active2",myClass.Active)
      cmd.ExecuteNonQuery();

I need the query to be executed at the same time