Esempio n. 1
0
        //=========================================================================================
        /// <summary>Создает данные о псевдо-БД.</summary>
        private void CreateTestData()
        {
            TableVariant oTableUser = new TableVariant()
            {
                Name = "User", Columns = new string[] { "First Name", "Last Name" }
            };
            TableVariant oTableOrg = new TableVariant()
            {
                Name = "Org", Columns = new string[] { "Name", "Address" }
            };

            SchemaVariant oSchemaFirst = new SchemaVariant()
            {
                Name = "Schema_First", Tables = new List <TableVariant>()
                {
                    oTableUser, oTableOrg
                }
            };

            TableVariant oTableFruits = new TableVariant()
            {
                Name = "Fruits", Columns = new string[] { "Apple", "Lemon" }
            };
            TableVariant oTableVitamins = new TableVariant()
            {
                Name = "Vitamins", Columns = new string[] { "A", "B" }
            };

            SchemaVariant oSchemaSecond = new SchemaVariant()
            {
                Name = "Schema_Second", Tables = new List <TableVariant>()
                {
                    oTableFruits, oTableVitamins
                }
            };
            SchemaVariant oSchemaThird = new SchemaVariant()
            {
                Name = "Schema Third", Tables = new List <TableVariant>()
                {
                    oTableFruits, oTableVitamins
                }
            };

            //SchemaVariant oSchemaTest = new SchemaVariant() { Name = "Test" };

            this.Variants = new TopLevelVariant()
            {
                Schemas = new List <SchemaVariant>()
                {
                    oSchemaFirst, oSchemaSecond, oSchemaThird
                }
            };
        }
		//=========================================================================================
		/// <summary>Создает данные о псевдо-БД.</summary>
		private void CreateTestData()
		{
			TableVariant oTableUser = new TableVariant() { Name = "User", Columns = new string[] { "First Name", "Last Name" } };
			TableVariant oTableOrg = new TableVariant() { Name = "Org", Columns = new string[] { "Name", "Address" } };

			SchemaVariant oSchemaFirst = new SchemaVariant() { Name = "Schema_First", Tables = new List<TableVariant>() { oTableUser, oTableOrg } };

			TableVariant oTableFruits = new TableVariant() { Name = "Fruits", Columns = new string[] { "Apple", "Lemon" } };
			TableVariant oTableVitamins = new TableVariant() { Name = "Vitamins", Columns = new string[] { "A", "B" } };

			SchemaVariant oSchemaSecond = new SchemaVariant() { Name = "Schema_Second", Tables = new List<TableVariant>() { oTableFruits, oTableVitamins } };
			SchemaVariant oSchemaThird = new SchemaVariant() { Name = "Schema Third", Tables = new List<TableVariant>() { oTableFruits, oTableVitamins } };
			//SchemaVariant oSchemaTest = new SchemaVariant() { Name = "Test" };

			this.Variants = new TopLevelVariant() { Schemas = new List<SchemaVariant>() { oSchemaFirst, oSchemaSecond, oSchemaThird } };
		}