示例#1
0
        public SqlConnector ForDatabase(Maps.DatabaseName database)
        {
            if (database == null)
            {
                return(this);
            }

            return(new SqlConnector(Replace(connectionString, database), this.Schema, this.DynamicQueryManager, this.Version));
        }
示例#2
0
        public override ObjectName GenerateTableName(Type type, TableNameAttribute tn)
        {
            if (tn != null)
            {
                if (tn.SchemaName == "sys")
                {
                    DatabaseName db = Administrator.sysViewDatabase.Value;

                    return(new ObjectName(new SchemaName(db, tn.SchemaName ?? "dbo"), tn.Name));
                }
            }

            return(base.GenerateTableName(type, tn));
        }
示例#3
0
 public void ToDatabase(DatabaseName databaseName)
 {
     this.Name = this.Name.OnDatabase(databaseName);
 }
 public ObjectName OnDatabase(DatabaseName databaseName)
 {
     return(new ObjectName(new SchemaName(databaseName, Schema.Name), Name));
 }