title: Entity Framework Core 5 tries to insert value for computed column
body: <p>Using Entity Framework 5 and EF Core Power Tools (whith the setting to generate ef 5 code enabled) we get something like the following code generated for each computed column:</p>
  <pre><code>...HasComputedColumnSql(&quot;([LastName]+isnull(' '+[FirstName],''))&quot;, true);
  </code></pre>
  <p>which is perfectly right.</p>
  <p>Unfortunately, trying to create a new entity that has computed columns and trying to save we get the following exception from ef core 5:</p>
  <blockquote>
  <p>The column '...' cannot be modified because it is either a computed column or is the result of a UNION operator</p>
  </blockquote>
  <p>When manualy appending the <code>ValueGeneratedOnAddOrUpdate</code> after the <code>HasComputedColumnSql</code> like so:</p>
  <pre><code> ...HasComputedColumnSql(&quot;([LastName]+isnull(' '+[FirstName],''))&quot;, true).ValueGeneratedOnAddOrUpdate();
  </code></pre>
  <p>everything works fine.</p>
  <p>According to the docs this should be automatically be called by <code>HasComputedColumnSql</code>.</p>
  <p>What can be done to overcome this issue ?</p>
  <p>We are using Microsoft.EntityFrameworkCore v5.0.5 package and also we are using an Azure Managed Sql Server Instance</p>