title: Parameter Add in C#
body: <p>How use Parameter.add with when i have two insert statements like below</p>
  
  <blockquote>
    <p>structure table:</p>
  </blockquote>
  
  <pre><code>CREATE TABLE TAccount
  (
      Username nchar(10), // Primary Key
      Password nchar(100),
      RolesId int // Foreign Key from table Role
  );
  
  CREATE TABLE TUser
  (
      UserId nchar(10), // Primary Key &amp; Foreign Key from table Account
      Name nchar(100),
      Birthday date,
      Address nchar(100) 
  );
  </code></pre>
  
  <blockquote>
    <p>Model</p>
  </blockquote>
  
  <pre><code>//class user
  public string UserId { get; set; }
  public string Name { get; set; }
  public string Birthday { get; set; }
  public string Address { get; set; }
  </code></pre>
  
  <blockquote>
    <p>snippet code:</p>
  </blockquote>
  
  <pre><code>// method InsertUser(List&lt;User&gt; data)
  comm.CommandText = "INSERT INTO TAccount (Username, Password, RolesID) VALUES (@UserId, @UserId, 4) " +
                     "INSERT INTO TUser (UserId, Name, Birthday, Address) VALUES (@UserId, @Name, @Birthday, @Address)";
  
  // HOW TO GENERATE VALUE DATA TO QUERY?
  
  comm.CommandType = CommandType.Text;
  conn.Open();
  comm.ExecuteNonQuery();
  </code></pre>