IWindowMeta.Table Property
.NET Standard 2.x
Gets or sets an IDwTable
object which contains the various settings for the database.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
IDwTable Table { get; set; }
Return
An IDwTable
object which contains the various settings for the database. You can use the IDwTable
object to get or set properties for the DataStore's DBMS connection.
Examples
The following code example demonstrates how to use the Table property.
using DWNet.Data;
using System;
namespace Appeon.ApiDoc.IWindowMetaExamples
{
public class TableExample
{
private readonly SchoolContext _context;
public TableExample(SchoolContext dataContext)
{
// Sets the data context
_context = dataContext;
}
public void Example()
{
// Instantiates datastore with datawindow: d_department
var datastore = new DataStore("d_department", _context);
datastore.Retrieve();
// Gets the properties of the DataWindow object.
var windowMeta = datastore.DwMeta.DataWindow;
// Gets an IDwTable object which contains the various settings for the database.
var dwTable = windowMeta.Table;
Console.WriteLine("Columns Count: {0}", dwTable.Columns.Count);
Console.WriteLine("SelectAttribute: {0}", dwTable.SelectAttribute);
Console.WriteLine("UpdateTable: {0}", dwTable.UpdateTable);
Console.WriteLine("UpdateWhere: {0}", dwTable.UpdateWhere);
/*This code produces the following output:
Columns Count: 5
SelectAttribute: PBSELECT( VERSION(400) TABLE(NAME="Department" )
COLUMN(NAME="Department.DepartmentID")
COLUMN(NAME="Department.Name")
COLUMN(NAME="Department.Budget")
COLUMN(NAME="Department.StartDate")
COLUMN(NAME="Department.Administrator") )
UpdateTable: dbo.Department
UpdateWhere: KeyAndUpdatableColumns
*/
}
}
}
Example Refer To
Model Class: D_Department
DataWindow File: d_department
Applies to
.NET Standard
2.x