コード例 #1
0
        public bool Install()
        {
            var  inspector  = new DbInspector(this.Tenant);
            bool hasDb      = inspector.HasDb();
            bool canInstall = inspector.IsWellKnownDb();

            if (hasDb)
            {
                Log.Verbose($"No need to create database \"{this.Tenant}\" because it already exists.");
            }

            if (!canInstall)
            {
                Log.Verbose(
                    $"Cannot create a database under the name \"{this.Tenant}\" because the name is not a well-known tenant name.");
            }

            if (!hasDb && canInstall)
            {
                Log.Information($"Creating database \"{this.Tenant}\".");
                this.CreateDb();
                return(true);
            }

            return(false);
        }
コード例 #2
0
ファイル: DbInstaller.cs プロジェクト: manishkungwani/frapid
        public bool Install()
        {
            var inspector = new DbInspector(this.Catalog);
            bool hasDb = inspector.HasDb();
            bool canInstall = inspector.IsWellKnownDb();

            if (!hasDb && canInstall)
            {
                return this.CreateDb();
            }

            return false;
        }
コード例 #3
0
        public bool Install()
        {
            var  inspector  = new DbInspector(this.Catalog);
            bool hasDb      = inspector.HasDb();
            bool canInstall = inspector.IsWellKnownDb();

            if (!hasDb && canInstall)
            {
                return(this.CreateDb());
            }

            return(false);
        }