Ejemplo n.º 1
0
        private static ModelSqlDatabase GetTestModelSqlDatabase()
        {
            ModelSqlServer modelSqlServer = new ModelSqlServer();

            modelSqlServer.Name = new SqlName(null, "default", ObjectLevel.Server);

            var serverScope = modelSqlServer.GetScope();

            var result = new ModelSqlDatabase(modelSqlServer, "OfaSchlupfer");

            result.Name = new SqlName(null, "OfaSchlupfer", ObjectLevel.Database);

            ModelSqlSchema schema = new ModelSqlSchema(result, "dbo");

            ModelSqlTable table = new ModelSqlTable(schema, "name");

            var col = (new ModelSqlColumn(table, "key"));

            return(result);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModelSqlDatabase"/> class.
 /// </summary>
 /// <param name="sqlServer">the owner</param>
 /// <param name="name">the name of the database</param>
 public ModelSqlDatabase(ModelSqlServer sqlServer, string name)
     : this(sqlServer.GetScope())
 {
     this.Name       = sqlServer.Name.Child(name, ObjectLevel.Database);
     this._SqlServer = sqlServer;
 }