# DataSourceManager.LoadObjects Method

> Loads a collection implementing the interface IEnumerable as a data source and deduces the data tables, column names and data relations from the public properties and used classes of the first contained object using .NET reflection or, in case of the first contained object being a Dictionary with string keys, from the key names and value types.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.DocumentServer.DataSources`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXDocumentServer.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.DocumentServer.DataSources > DataSourceManager.LoadObjects Method
- **420 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadobjects-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadobjects-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadobjects-method/llms-full.txt

---

### Description

Loads a collection implementing the interface `IEnumerable` as a data source and deduces the data tables, column names and data relations from the public properties and used classes `of the first contained object` using .NET reflection or, in case of the first contained object being a Dictionary with string keys, from the key names and value types.

### Syntax

```csharp
public void LoadObjects(IEnumerable objects);
```

```vbnet
Public Sub LoadObjects(objects As IEnumerable)
```

### Parameters

| Parameter | Description |
|---|---|
| objects | A collection implementing interface `System.Collections.IEnumerable` containing objects of any type. The existing tables, ccolumns and data relations are deduced `from the the first contained object`. |

### Examples

The following example uses Load Objects in a focused Data Source Manager workflow. The created object is then available to the surrounding document workflow.

```csharp
dataSourceManager.LoadObjects(new UserDefinedPropertyDictionary());
Console.WriteLine("Data Source Manager is ready for use.");
```

```vbnet
dataSourceManager.LoadObjects(New UserDefinedPropertyDictionary())
Console.WriteLine("Data Source Manager is ready for use.")
```

---

## Nearby

- **Previous:** [DataSourceManager.LoadJson Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadjson-method/llms-full.txt)
- **Next:** [DataSourceManager.LoadSingleObject Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadsingleobject-method/llms-full.txt)
