Why doesn't Add-Migration generate a DbMigration automatically?

383 Views Asked by At

When ever I add a new Model, few days back on executing Add-Migration ModelName The DbMigration was getting generating automatically, all the basic create table thins were generating automatically. I only had to run Update-Database .

But few days back, whenever I add a new model, now on executing Add-Migration ModelName nothing happens it just generates the empty DbMigration like below :

 public partial class Blogs : DbMigration
    {
        public override void Up()
        {
        }

        public override void Down()
        {
        }
    }

There should be create table thing generated inside the Up() method and similarly rollback statement in Down(),

Anyone else has faced the same issue, can someone suggest what may be the cause ?

Thanks :)

0

There are 0 best solutions below