title: Memory Optimized Tables + Encryption and Identity Column
body: <p>I was wondering whether it is possible to have a always encrypted <code>Memory Optimized Table</code> and also have its Primary Key automatically seeded? For example, I want to create the following:</p>
  
  <pre><code>CREATE TABLE Foo
  (
      [Id] [int] Identity(1,1) NOT NULL,
      [Bar] NVARCHAR(MAX) NOT NULL,
      CONSTRAINT [PK_Foo] PRIMARY KEY NONCLUSTERED ([Id] ASC)
  )
  WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_ONLY)
  GO
  </code></pre>
  
  <p>Fairly simple table and is initially created fine however, when I attempt to encrypt the column <code>Bar</code> I get the following exception.</p>
  
  <blockquote>
    <p>Apr 21 2017 09:23:00 [Error] WorkitemExecution: Message:Inner
    exception: System.Data.SqlClient.SqlException   Details: Cannot insert
    explicit value for identity column in table 'Foo' when IDENTITY_INSERT
    is set to OFF..</p>
  </blockquote>
  
  <p>I also tried setting <code>SET IDENTITY_INSERT Foo ON</code> after the create table statement but still no luck. </p>
  
  <p>Reading the documentation as well doesn't seem to suggest this isn't possible but perhaps I have missed something? If this isn't possible I have another approach which I know will work.</p>
  
  <p>I guess my question in summary is.. <em>"do Memory Optimized Tables support always encrypted with an identity column"</em>.</p>