I'm trying to generate a migration based on a model:
[Key]
public int Id { get; set; }
[MaxLength(100)]
public string NomeInstituicao_Fundamental { get; set; }
public string AnoInicio_Fundamental { get; set; }
public string AnoFim_Fundamental { get; set; }
[MaxLength(100)]
public string NomeInstituicao_Superior { get; set; }
public string AnoInicio_Superior { get; set; }
public string AnoFim_Superior { get; set; }
public Aluno aluno{ get; set; }
But after running the command: Add-Migration , my migration is generated, but the Up () function is empty. I need it to already be modeled, just like the attributes defined in my model.
public partial class AcademicosMig : DbMigration
{
public override void Up()
{
}
public override void Down()
{
}
}
Context:
public class Context : DbContext
{
public Context() : base("name=Default")
{
this.Configuration.LazyLoadingEnabled = false;
this.Configuration.ProxyCreationEnabled = false;
}
public DbSet<Academicos> Academico_ { get; set; }
}