title: Sqlite Remove Not Null Constraints InMemory
body: <p>How do I remove all Not Null Constraints in SQL Lite Inmemory Database for All Tables?
  I have Foreign Keys = false, to remove Foreign Keys.</p>
  <pre><code>var InMemoryConnectionString = &quot;DataSource=:memory:;Foreign Keys=False&quot;;
  var _connection = new SqliteConnection(InMemoryConnectionString);
  
  _connection.Open();
  var options = new DbContextOptionsBuilder&lt;TestContext&gt;()
          .UseSqlite(_connection)
          .Options;
  var testContext = new TestContext(options);
  testContext.Database.EnsureCreated();
  </code></pre>
  <p>Looking to Remove All Constraints would be a better answer.</p>
  <p>Getting Not null errors, if All required fields are not filled out.</p>
  <pre><code> var seedData= new List&lt;Product&gt;
  {
      new Product
      { ProductId = 1, Description = &quot;test&quot; },
      new Product
      { ProductId = 2, Description = &quot;test2&quot; }
  };
  
  testContext.Product.AddRange(seedData);
  testContext.SaveChanges();
  </code></pre>
  <blockquote>
  <p>Error:
  Microsoft.EntityFrameworkCore.DbUpdateException : An error occurred while updating the entries. See the inner exception for details.
  ---- Microsoft.Data.Sqlite.SqliteException : SQLite Error 19: 'NOT NULL constraint failed: Product.ProductNumber'.</p>
  </blockquote>