title: Entity Framework - Row size greater than allowable maximum row size of 8060
body: <p>I have an entity with a binary datatype and a corresponding <code>varbinary(max)</code> column in SQL Server. EF creates this:</p>
  
  <pre><code>CREATE TABLE [dbo].[Attachments] 
  (
      [Id] INT IDENTITY(1,1) NOT NULL,
      [FileName] NVARCHAR(255) NOT NULL,
      [Attachment] VARBINARY(MAX) NOT NULL
  );
  </code></pre>
  
  <p>When I try to call <code>.SaveChanges()</code> from Entity Framework, I get an error: </p>
  
  <blockquote>
    <p>Cannot create a row of size 8061 which is greater than the allowable maximum row size of 8060</p>
  </blockquote>
  
  <p>I understand the error, there's plenty of that on Google but I don't understand why I'm getting it. Shouldn't this be managed by Entity Framework / SQL Server?</p>
  
  <p>Richard</p>