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
版权声明:本文标题:c# - No context type was found in the assembly in my ASP.NET web application - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741976135a2408133.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论