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

namespace DemoVideo.Nutil
{
    static class Util
    {
        public static List<Compte> GetComptes()
        {
            List<Compte> l = new List<Compte>() {
                new Compte("101", new DateTime (2016 , 10 , 10 ), 100),
                new Compte("102", new DateTime (2017 , 7 , 18 ), 0),
                new Compte("103", new DateTime (2017 , 3 , 15 ), 100),
                new Compte("104", new DateTime (2016 , 2 , 05 ), 500),
                new Compte("105", new DateTime (2015 , 8 , 03 ), 200),
                new Compte("106", new DateTime (2014 , 9 , 24 ), 200),
                new Compte("107", new DateTime (2015 , 1 , 27 ), 200) };
            return l;
        }
         
        public static void CreateTable ()
        {
            var initializer = new CreateDatabaseIfNotExists<ContextEf>();
            initializer.InitializeDatabase(new ContextEf()); 
        }

        public static void InitTable()
        {
            var initializer = new InitCompte();
            initializer.InitializeDatabase(new ContextEf());
        }

    }
}
