I want to create a new datatable in my database. I ran Add-Migration items, it shows empty for both up() and down()
namespace myapp.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class items : DbMigration
{
public override void Up()
{
}
public override void Down()
{
}
}
}
I have a model:
public class Item
{
public string name { get; set; }
public int defineindex { get; set; }
}
public class ItemContext : DbContext
{
public DbSet<Item> Items { get; set; }
}
I also created a mapping when the above code doesnt generate useful scaffold. But it still didnt solve my problem.