Exemplo n.º 1
0
        public static void VerifyObject <TDatabaseObject>() where TDatabaseObject : IDatabaseObject
        {
            var _path = SharedFunctions.GetScriptsDir();

            if (m_DataFunction.CheckDdlScript <TDatabaseObject>(_path))
            {
                return;
            }
            if (m_DataFunction.AlterTable <TDatabaseObject>())
            {
                m_DataFunction.SaveDdlScript <TDatabaseObject>(_path);
            }
        }
Exemplo n.º 2
0
        public static void VerifyObject <TDatabaseObject>(IDataFunctions func, string path) where TDatabaseObject : IDatabaseObject
        {
            try
            {
                if (func.CheckDdlScript <TDatabaseObject>(path))
                {
                    return;
                }

                if (func.AlterTable <TDatabaseObject>())
                {
                    func.SaveDdlScript <TDatabaseObject>(path);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }