title: Error -"Could not drop constraint" when execute .AsQueryable();
body: <p>I am using EF code first to generate many to many relation. as the following:</p>
  
  <pre><code>public  class User
  {
      public User()
      {
          Categories = new Collection&lt;Category&gt;();
      }
      public  int UserId { get; set; }
      public  string LastName { get; set; }
      public ICollection&lt;Category&gt; Categories { get; set; }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code> public sealed class Category
  {
      public Category()
      {
          Users = new Collection&lt;User&gt;();
      }
      public string Name { get; set; }
      public int Id { get; set; }
      public ICollection&lt;User&gt; Users { get; set; }
  
  }
  </code></pre>
  
  <p>My Db context look like:</p>
  
  <pre><code>    public DbSet&lt;User&gt; Users { get; set; }
      public DbSet&lt;Category&gt; Categories { get; set; }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
  
          modelBuilder.Entity&lt;User&gt;().HasMany(b =&gt; b.Categories).WithMany(a =&gt; a.Users).Map(m =&gt; m.MapLeftKey("userId").MapRightKey("id"));
  
          base.OnModelCreating(modelBuilder);
      }
  </code></pre>
  
  <p>The weird issue is when Im doing simple action like:</p>
  
  <pre><code>_ctx.Categories.AsQueryable();
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>The constraint 'PK_dbo.Categories' is being referenced by table 'UserCategories', foreign key constraint 'FK_dbo.CategoryUsers_dbo.Categories_id'.
    Could not drop constraint. See previous errors.</p>
  </blockquote>