title: How to insert a new record which has a auto increment number as primary key?
body: <p>For example, I have the following Table:</p>
  
  <p><strong>CustomerInfo</strong></p>
  
  <pre><code>cus_id: auto increment, int, is Identity
  cus_name: nvarchar
  </code></pre>
  
  <p>If I use the follow codes to insert the record "Peter",</p>
  
  <pre><code>string name = "Peter";
  DataContext DC = new DataContext();
  CustomerInfo newCustomer = new CustomerInfo();
  newCustomer.cus_name = name;
  
  DC.CustomerInfos.InsertOnSubmit(newCustomer);
  DC.SubmitChanges();
  </code></pre>
  
  <p>The following error returns,</p>
  
  <blockquote>
    <p>Can't perform Create, Update, or Delete operations on 'Table(CustomerInfo)' because it has no primary key.</p>
  </blockquote>
  
  <p>Do I need to self-define the <code>cus_id</code> or any other solutions? Thanks!</p>