using DemoVideo.Nbanque;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoVideo.NEf
{
    public class InitCompte : CreateDatabaseIfNotExists<ContextEf>
    {
      
        protected override void Seed ( ContextEf context)
        {
            base.Seed(context);
            context.CompteEntities.Add(new Compte("101", new DateTime(2016, 10, 10), 100));
            context.CompteEntities.Add(new Compte("102", new DateTime(2017, 7, 18), 0));
            context.CompteEntities.Add(new Compte("103", new DateTime(2017, 3, 15), 100));
            context.CompteEntities.Add(new Compte("104", new DateTime(2016, 2, 05), 500));
            context.CompteEntities.Add(new Compte("105", new DateTime(2015, 8, 03), 200));
            context.CompteEntities.Add(new Compte("106", new DateTime(2014, 9, 24), 200));
            context.CompteEntities.Add(new Compte("107", new DateTime(2015, 1, 27), 200)); 
            context.SaveChanges(); 
        }
        
    }
}


