namespace Cbn.Sample.Web.Migrations
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;
    using Cbn.Sample.Entities;
    using Cbn.Sample.Core;

    internal sealed class Configuration : DbMigrationsConfiguration<CbnDbContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
        }

        protected override void Seed(CbnDbContext context)
        {
            context.Heros.AddOrUpdate(x => x.HeroId, new[]
            {
                new Hero { HeroId= 0,  Name= "Zero" },
                new Hero { HeroId= 11, Name= "Mr. Nice" },
                new Hero { HeroId= 12, Name= "Narco" },
                new Hero { HeroId= 13, Name= "Bombasto" },
                new Hero { HeroId= 14, Name= "Celeritas" },
                new Hero { HeroId= 15, Name= "Magneta" },
                new Hero { HeroId= 16, Name= "RubberMan" },
                new Hero { HeroId= 17, Name= "Dynama" },
                new Hero { HeroId= 18, Name= "Dr IQ" },
                new Hero { HeroId= 19, Name= "Magma" },
                new Hero { HeroId= 20, Name= "Tornado" }
            });
        }
    }
}
