title: EF: Cannot insert NULL to column
body: <p>I have the following table in the DB:</p>
  
  <p><img src="https://i.stack.imgur.com/N0NzY.png" alt="enter image description here"></p>
  
  <p>There are already apps in <code>Apps</code> table in the DB.
  I present them to the end-user and he has to add items to <code>AppsToDomains</code> table</p>
  
  <p>I'm trying to save an entity to that table:</p>
  
  <pre><code>private static void FillDomains(string[] domainsWls, EntityCollection&lt;AppToDomains_V1&gt; AppsToDomains, 
      Guid appGuid, Guid groupId ,bool isWhiteListed)
  {
      foreach (var domain in domainsWls)
      {
          AppsToDomains.Add(new AppToDomains_V1()
                                {
                                    Domain = domain,
                                    IsWhiteListed = isWhiteListed,
                                    AppId = appGuid,
                                    GroupId = groupId,
                                });
      }
  }
  </code></pre>
  
  <p>but get the following error:</p>
  
  <blockquote>
    <p>{"Cannot insert the value NULL into column 'ClientAppID', table 'MamDB.dbo.Apps'; column does not allow nulls. INSERT fails.\r\nThe statement has been terminated."}</p>
  </blockquote>
  
  <p>How can it be? as I don't add any row to the Apps table</p>