title: Can't perform Create, Update or Delete operations on Table because it has no primary key
body: <p>I've been trying to insert row in the table having an identity column RequestID (which is primary key as well)</p>
  
  <pre><code>    HelpdeskLog logEntry = new HelpdeskLog { RequestBody = message.Body };
      if (attachment != null)
          logEntry.Attachments = Helper.StreamToByteArray(attachment.ContentStream);
      Database.HelpdeskLogs.InsertOnSubmit(logEntry);
  </code></pre>
  
  <p>But my code inevitably  throws following error</p>
  
  <blockquote>
    <p>Can't perform Create, Update or Delete operations on Table  because it has no primary key.</p>
  </blockquote>
  
  <p>despite primary key column exists indeed</p>
  
  <p>That's what I tried to do:</p>
  
  <ol>
  <li>To look in debugger the value of identity column being inserted in object model. It is 0</li>
  <li>To insert manually (with SQL) fake values into table - works fine, identity values generated as expected</li>
  <li>To assure if SQLMetal has generated table map correctly . All OK, primary key attribute is generated properly</li>
  </ol>
  
  <p>Nevertheless, neither of approaches helped. What's the trick, does anybody know?</p>