Exago .NET API Documentation
Entities Property (Api)
Example 
WebReports.Api Namespace > Api Class : Entities Property
A collection of Entities (Data Objects) that exist in the current configuration.  Data Objects are Entity objects, and are managed via an EntityCollection object accessible through this property.
Syntax
public EntityCollection Entities {get;}
Exceptions
ExceptionDescription
Exception is thrown if the Entity.DbName cannot be found.
Exception is thrown if trying to create custom formula columns but no column metadata exists for the Entity (Data Object) yet.
Exception is thrown when attempting to add an entity object with the same name (aka alias) already exists in the collection. Entity names must be unique.
Example
Create a new Data Object named Campaigns, connect it to the "Donations MSSQL" data source and set its properties.
Entity myNewEntity = api.Entities.NewEntity("Campaigns");
myNewEntity.DataSourceId = api.DataSources.GetDataSource("Donations MSSQL").Id;
myNewEntity.ObjectType = DataObjectType.Table;
myNewEntity.Id = "campaigns";		//This is the Admin Console's Id field
myNewEntity.DbName = "Campaigns";	//This is the Admin Console's Name field
myNewEntity.Name = "campaigns";		//This is the Admin Console's Alias field
myNewEntity.ObjectDescription = "Fundraising campaigns";
myNewEntity.Category = "CRM\\Sales";	//This is the Admin Console's Folder field
api.SaveConfigToFile();			//Persist change to the XML config file.
Create a new Custom SQL Object Data Object connected to the NOrthwind data source.
Entity employees = api.Entities.NewEntity("Employees");

employees.DataSourceId = api.DataSources.GetDataSource("Northwind").Id;
employees.ObjectType = DataObjectType.SqlStmt;
employees.Id = "employees_1";
employees.Name = "Employees";
See Also

Reference

Api Class
Api Members
Entity Class
DataObjectType Class