Esempio n. 1
0
 /// <summary>
 /// 检查迁移
 /// </summary>
 /// <param name="db"></param>
 static void CheckMigrations(TibosDbContext db)
 {
     try
     {
         //执行迁移
         db.Database.Migrate();
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            using (var db = new TibosDbContext())
            {
                //检查迁移
                CheckMigrations(db);
            }


            //DictRepository Dict = new DictRepository(new TibosDbContext());
            //var dict_list = Dict.GetList();

            //var count = Dict.Count();

            //ManagerRepository Manager = new ManagerRepository(new DhmDbContext());

            //var manager_list = Manager.GetList();
        }