title: DbMigration seed sequence contains more than one element
body: <p>I have the following classes</p>
  
  <pre><code>public class Lookup
  {
      public int Id{get;set;}
      public string Name{get;set;}
      public int Order{get;set;}
  }
  
  public class CatalogType:Lookup // this was added on Add-migration "Second"
  {
  }
  
  public class Catalog:Lookup
  {
       public int CatalogTypeId{get;set;} // this was added on add-migration "Second"
  
       public CatalogType CatalogType{get;set;}
  }
  </code></pre>
  
  <p>and I already have data in the database in the table Lookups that represent group of lookup classes like gender, marital statuses, catalog, etc. and the Lookups table contains a row with <code>Name="General"</code> that was used by Catalog(i.e Discriminator field="Catalog")</p>
  
  <p>in the Configuration file inside the Seed function I wrote this code</p>
  
  <pre><code>context.Lookups.AddOrUpdate(p =&gt; new { p.Name, **p.GetType().FullName** },
              new CatalogType
              {
                  Name = "General",
                  IsActive = true,
                  Order = 1,
              },
              new CatalogType
              {
                  Name = "Custom",
                  IsActive = true,
                  Order = 2,
              });
    context.SaveChanges();
  </code></pre>
  
  <p>My problem: I tried first <code>context.Lookups.AddOrUpdate(p=&gt;p.Name)</code> and when I try to make <code>update-database</code>, the migration fails "<code>sequence contains more than one element</code>"</p>
  
  <p>Then I tried to use <code>p.GetType().Name</code> the error was: </p>
  
  <blockquote>
    <p>An anonymous type cannot have multiple properties with the same name.</p>
  </blockquote>
  
  <p>Then I tried to use <code>p.GetType().FullName</code> and upon executing the <code>update-database</code> command, I got the following error:</p>
  
  <blockquote>
    <p>The properties expression 'p => new &lt;>f__AnonymousType18`2(Name =
    p.Name, FullName = p.GetType().FullName)' is not valid. The expression
    should represent a property: C#: 't => t.MyProperty'  VB.Net:
    'Function(t) t.MyProperty'. When specifying multiple properties use an
    anonymous type: C#: 't => new { t.MyProperty1, t.MyProperty2 }' 
    VB.Net: 'Function(t) New With { t.MyProperty1, t.MyProperty2 }'.</p>
  </blockquote>
  
  <p>I know that the problem caused because Lookups table contains already the <code>Name="General"</code> but how to tell the EntityFramework to take the column discriminator into consideration while trying to AddOrUpdate method?</p>
  
  <p>in other words, i might have same data for 2 different objects and i want to add data on adding migration, how to achieve this if i have for example red car, red door and i want to add red apple for example? it will not allow me in my current situation, how to solve this issue?</p>
  
  <p>Hope my explanation for this problem was clear.</p>