admin管理员组

文章数量:1315357

I created an ASP.NET web application and I want to create and run migrations.

My DbContext:

using System.Data.Entity;
using SevenSuite_Prueba_Jose_Lopez.Models;

namespace SevenSuite_Prueba_Jose_Lopez.Models
{
    public class ApplicationDbContext : DbContext
    {
        public ApplicationDbContext() : base("DefaultConnection")
        {
        }

        public DbSet<SEVECLIE> SEVECLIE { get; set; }
    }
}

web.config:

<connectionStrings>
    <add name="DefaultConnection" 
         connectionString="Server=NombreDelServidor;Database=seven_suite;User Id=TuUsuario;Password=TuContraseña;" 
         providerName="System.Data.SqlClient" />
</connectionStrings>

But when running this command, I get this message:

PM> Enable-Migrations
No context type was found in the assembly

How do I run migrations? Or at least activate it, as I mentioned my context is already in the folder and it should work. But, it's like I don't have it.

How do I run migrations?

本文标签: cNo context type was found in the assembly in my ASPNET web applicationStack Overflow