[]
        
(Showing Draft Content)

C1.Web.Api.DataEngine.Data.FlexPivotEngineProviderManager.AddDataEngine

AddDataEngine Method

AddDataEngine(string, string, string)

Adds a DataEngine data which data files already exist.

Declaration
public FlexPivotEngineProviderManager AddDataEngine(string name, string workspace, string tableName)
Parameters
Type Name Description
string name

The unique value used to stand for the data source.

string workspace

Path in the server's file system where DataEngine data files locate.

string tableName

The name of the DataEngine table.

Returns
Type Description
FlexPivotEngineProviderManager

The flex pivot engine provider manager.

AddDataEngine(string, DbCommand, DbConnection, string, string)

Adds a DataEngine data from a database.

Declaration
public FlexPivotEngineProviderManager AddDataEngine(string name, DbCommand command, DbConnection connection = null, string workspace = null, string tableName = null)
Parameters
Type Name Description
string name

The unique value used to stand for the data source.

DbCommand command

ADO.NET command object for retrieving data from the database. The connection in the command should be open.

DbConnection connection

An open ADO.NET connection object for connecting to the database.

string workspace

Path in the server's file system where DataEngine data is saved in files. If it is set to null or not set, the default workspace is used. The default workspace path is "application base path + /Data". You can change it via the Owin.IAppBuilder.SetDefaultWorkspacePath(string path) method.

string tableName

The name of the DataEngine table. If it is set to null or not set, the value of the name parameter is used.

Returns
Type Description
FlexPivotEngineProviderManager

The flex pivot engine provider manager.

AddDataEngine<T>(string, Func<IEnumerable<T>>, string, string)

Adds a DataEngine data from an arbitrary IEnumerable.

Declaration
public FlexPivotEngineProviderManager AddDataEngine<T>(string name, Func<IEnumerable<T>> dataGetter, string workspace = null, string tableName = null)
Parameters
Type Name Description
string name

The unique value used to stand for the data source.

Func<IEnumerable<T>> dataGetter

A function to get an arbitrary IEnumerable.

string workspace

Path in the server's file system where DataEngine data is saved in files. If it is set to null or not set, the default workspace is used. The default workspace path is "application base path + /Data". You can change it via the Owin.IAppBuilder.SetDefaultWorkspacePath(string path) method.

string tableName

The name of the DataEngine table. If it is set to null or not set, the value of the name parameter is used.

Returns
Type Description
FlexPivotEngineProviderManager

The flex pivot engine provider manager.

Type Parameters
Name Description
T