Avectra.netFORUM.Data.DynamicData

Avectra.netForum.Data.DynamicData is a subclass of Avectra.netForum.Data.DataClass and is used to declare data objects for a static Facade Class. The DynamicData contains the information about all the columns in a Table and is used in select/read/write/delete operations of the Facade Class.

Like DataClass, Dynamic Data is essentially the code expression of Data Objects as set up in the Toolkit.

Properties

Most usable properties are contained in the parent DataClass.

Methods

The main methods are encapsulated in various constructors into which you will pass the table name, extender table name, 3-character column prefix, primary key column name, etc.

Usage and Examples

The most common usage of this class is to declare it as a public property, then create a new object in the constructor of the class, then call Avectra.netForum.Data.FacadeClass.AddDataObject method to add the data object to the Facade Class.

Here is an abbreviated sample:

using System;
using System.Data;
using System.Data.OleDb;
using Avectra.netForum.Common;
using Avectra.netForum.Data;
 
namespace Avectra.netForum.Components
{
[Serializable()]
public class MyClass : FacadeClass
{
/// Declare the DynamicData:
public DynamicData _oData;
}
 
public MyClass()
{
/// Instantiate new DynamicData, and pass database table properties into the constructor:
_oData = new DynamicData("ab_author", "ab_author_ext","aut","aut","aut_key","aut_key_ext","aut_delete_flag","Author");
 
/// Add to the class's collection of data objects:
AddDataObject("aut",_oData,"Author");
}
}