title: EF - could not find a model
body: <p>I have 2 similar DBs. So, both DBs have tables AllowedDates and AllowedTimes (with the same structore). I try to connect to these 2 DBs in my project. I created first model (DB.edmx) for first DB and second model (TEX.edmx) for second DB. Also, I renamed to AllowedDateTex and AllowedTimeTex EntityTypes for TEX.edmx to prevent name conflict of classes. In result, I have error in any case on line:</p>
  
  <pre><code>        List&lt;AllowedDateTex&gt; allowedDatesTex = (from i in _dbContextTex.AllowedDateTexes select i).ToList();
  </code></pre>
  
  <blockquote>
    <p>Additional information: Could not find the conceptual model type for
    'ITW2012Mobile.Models.AllowedDate'.</p>
  </blockquote>
  
  <p>why it tries to use 'ITW2012Mobile.Models.AllowedDate' and how to fix it?</p>
  
  <p>I use the latest version of EF.</p>
  
  <p><strong>[ADDED]</strong></p>
  
  <p>My connection strings:</p>
  
  <pre><code>&lt;add name="DefaultConnection" connectionString="data source=(local);initial catalog=JSAVIP;Integrated Security=True" providerName="System.Data.SqlClient" /&gt;
  &lt;add name="ITW2012Entities" connectionString="metadata=res://*/Models.DB.csdl|res://*/Models.DB.ssdl|res://*/Models.DB.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=(local);initial catalog=JSAVIP;Integrated Security=True;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
  &lt;add name="TexEntities" connectionString="metadata=res://*/Models.TEX.csdl|res://*/Models.TEX.ssdl|res://*/Models.TEX.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=(local);initial catalog=fsmf2012;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>call a second model:</p>
  
  <pre><code>    TexEntities _dbContextTex;
      _dbContextTex = new TexEntities();
      var a = (from i in _dbContextTex.AllowedDateTexes select i).ToList();
  </code></pre>
  
  <p>(on third string I get the error "Additional information: Could not find the conceptual model type for 'ITW2012Mobile.Models.AllowedDate'.")</p>
  
  <p>defined AllowedDateTex etc:</p>
  
  <pre><code>namespace ITW2012Mobile.Models
  {
      using System;
      using System.Data.Entity;
      using System.Data.Entity.Infrastructure;
  
      public partial class TexEntities : DbContext
      {
          public TexEntities()
              : base("name=TexEntities")
          {
          }
  
          protected override void OnModelCreating(DbModelBuilder modelBuilder)
          {
              throw new UnintentionalCodeFirstException();
          }
  
          public DbSet&lt;AllowedDateTex&gt; AllowedDateTexes { get; set; }
          public DbSet&lt;AllowedTimeTex&gt; AllowedTimeTexes { get; set; }
      }
  }
  
  namespace ITW2012Mobile.Models
  {
      using System;
      using System.Collections.Generic;
  
      public partial class AllowedDateTex
      {
          public AllowedDateTex()
          {
              this.AllowedTimes = new HashSet&lt;AllowedTimeTex&gt;();
          }
  
          public int DayID { get; set; }
          public System.DateTime Day { get; set; }
  
          public virtual ICollection&lt;AllowedTimeTex&gt; AllowedTimes { get; set; }
      }
  }
  
  namespace ITW2012Mobile.Models
  {
      using System;
      using System.Collections.Generic;
  
      public partial class AllowedTimeTex
      {
          public int TimeID { get; set; }
          public int DayID { get; set; }
          public int Hour { get; set; }
          public int Minute { get; set; }
  
          public virtual AllowedDateTex AllowedDate { get; set; }
      }
  }
  </code></pre>
  
  <p>EDIT 2:</p>
  
  <p>I decided to remove EF-models at all and recreate it. When I add first EF-model - all is ok. When I add one more with tables, which have the same names, as in first EF-model then classes from first model are recreated!</p>
  
  <p>Thanks</p>