using DbCommon.BusinessCore.DbCore;
using DbCommon.Enties.DbModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbCommon.BusinessCore.BaseCore
{
    public class AgvInfoManager : DbContext<AgvInfo>
    {
        public void Init()
        {
            //If no exist create datebase 
            //Db.DbMaintenance.CreateDatabase();

            //var dt = Db.Ado.GetDataTable("SELECT * FROM sysobjects WHERE NAME = 'AgvInfo'");
            if (!Db.DbMaintenance.IsAnyTable("AgvInfo", false))
            {
                //Create tables
                Db.CodeFirst.InitTables(typeof(AgvInfo));
            }
        }
    }
}
