How to run Seed() method of Configuration class of migrations

Answering your first question. Create a Migration by running add-migration SeedOnly

Clear out all Up() and Down() code generated if there was any pending changes

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

    public override void Down()
    {
    }
}

Then you can Target a Specific Migration by running update-database -TargetMigration SeedOnly in the Package Manager console

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)