public override DataSourceEntityGroup[] ListEntities()
		{
			DataSourceEntityGroup classes = new DataSourceEntityGroup("Classes");
			foreach (Type t in GetClasses())
			{
				classes.AddEntity(t.Name, t.Namespace);
			}
			return new DataSourceEntityGroup[] {classes};
		}
		public override DataSourceEntityGroup[] ListEntities()
		{
			_dbschema = SchemaBuilder.CreateDatabaseSchema(this.ConnectionString, DbType.SQLSERVER, DbProviderType.OLEDB);
			DataSourceEntityGroup tables = new DataSourceEntityGroup("Tables");
			DataSourceEntityGroup views = new DataSourceEntityGroup("Views");
			foreach (TableSchema entity in _dbschema.SortedTables.Values) 
			{
				if (entity.TableType == TableType.TABLE) 
				{
					tables.AddEntity(entity.Name);
				}
				else if (entity.TableType == TableType.VIEW) 
				{
					views.AddEntity(entity.Name);
				}
			}
			return new DataSourceEntityGroup[] {tables, views};
		}
Пример #3
0
		internal void AddSubGroup(DataSourceEntityGroup group)
		{
			_entities.Add(group);
		}