title: Enable Migrations Not working
body: <p>I have an application which has three layers.I am using EntityFramework 6.1 and code first migrations using existing database.The three layers are given below:</p>
  
  <p>1.<strong>Presententation Layer</strong>:ConceptuCodeFirstMigrationDemo
  Simply a Console Application for simplicity</p>
  
  <p><strong>Data Layer</strong> Consists of Context and Initializer.The codes are given below:</p>
  
  <pre><code>     namespace ConceptuCodeFirstMigrationDemo.Data.DataContext
          {
            using System;
            using System.Data.Entity;
            using System.ComponentModel.DataAnnotations.Schema;
            using System.Linq;
            using ConceptuCodeFirstMigrationDemo.Domain;
  
      public partial class ConceptuContext : DbContext,IDisposable
      {
          public ConceptuContext()
              : base("name=ConceptuContext")
          {
          }
         public virtual DbSet&lt;User&gt; Users { get; set; }
         protected override void OnModelCreating(DbModelBuilder modelBuilder)
          {
                  modelBuilder.Entity&lt;User&gt;()
  
                  .WithRequired(e =&gt; e.User)
                  .HasForeignKey(e =&gt; e.CreatedBy)
                  .WillCascadeOnDelete(false);
  
           }
         }
        }
  </code></pre>
  
  <p>ConceptuInitializer.Cs</p>
  
  <pre><code>namespace ConceptuCodeFirstMigrationDemo.Data.DataContext
  {
     public class ConceptuInitializer:      System.Data.Entity.CreateDatabaseIfNotExists&lt;ConceptuContext&gt;
      {
      }
  }
  </code></pre>
  
  <p>Appconfig:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;entityFramework&gt;
      &lt;contexts&gt;
  
          &lt;context type="ConceptuCodeFirstMigrationDemo.Data.DataContext.ConceptuContext, ConceptuCodeFirstMigrationDemo.Data"&gt;
            &lt;databaseInitializer type="ConceptuCodeFirstMigrationDemo.Data.DataContext.ConceptuInitializer, ConceptuCodeFirstMigrationDemo.Data" /&gt;
          &lt;/context&gt;
      &lt;/contexts&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
    &lt;connectionStrings&gt;
      &lt;add name="ConceptuContext" connectionString="data source=AMITABHA-PC;initial catalog=Conceptu;user id=sa;password=lovediya;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>Domain Layer:</strong> Consists of entity class for example user</p>
  
  <p>After writing a new class when I try to enable migrations using Enable-Migrations
  showing 
  <strong>No context type was found in the assembly 'ConceptuCodeFirstMigrationDemo'.</strong></p>
  
  <p>After I tried the following command:
  Enable-Migrations -ContextTypeName ConceptuCodeFirstMigrationDemo.Data.DataContext.ConceptuContext</p>
  
  <p>this shows following error
  <strong>The context type 'ConceptuCodeFirstMigrationDemo.Data.DataContext.ConceptuContext' was not found in the assembly 'ConceptuCodeFirstMigrationDemo'.</strong></p>
  
  <p>After I tried the following command
  Enable-Migrations  ConceptuCodeFirstMigrationDemo.Data.DataContext.ConceptuContext</p>
  
  <p>It shows the following error</p>
  
  <p><strong>Enable-Migrations : A positional parameter cannot be found that accepts argument 'ConceptuCodeFirstMigrationDemo.Data.DataContext.Concept
  uContext'.
  At line:1 char:18
  + Enable-Migrations &lt;&lt;&lt;&lt;   ConceptuCodeFirstMigrationDemo.Data.DataContext.ConceptuContext
      + CategoryInfo          : InvalidArgument: (:) [Enable-Migrations], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Enable-Migrations</strong></p>