SaaS CMS has officially launched! Learn more now.

Class Table

Represents a Microsoft SQL Server table.

Inheritance
System.Object
Table
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.BusinessFoundation.Data.Sql.Management
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 11.8.3
Syntax
public class Table

Constructors

Table()

Initializes a new instance of the Table class.

Declaration
public Table()

Table(Database, String, String, TableType, String)

Initializes a new instance of the Table class.

Declaration
public Table(Database qualifier, string owner, string name, TableType type, string remarks)
Parameters
Type Name Description
Database qualifier

The qualifier.

System.String owner

The owner.

System.String name

The name.

TableType type

The type.

System.String remarks

The remarks.

Properties

Columns

Gets the columns.

Declaration
public ColumnCollection Columns { get; }
Property Value
Type Description
ColumnCollection

The columns.

Name

Gets the name.

Declaration
public string Name { get; }
Property Value
Type Description
System.String

The name.

Owner

Gets the owner.

Declaration
public string Owner { get; }
Property Value
Type Description
System.String

The owner.

PrimaryKey

Gets the primary key.

Declaration
public Column PrimaryKey { get; }
Property Value
Type Description
Column

The primary key.

Qualifier

Gets the qualifier.

Declaration
public Database Qualifier { get; }
Property Value
Type Description
Database

The qualifier.

Remarks

Gets the remarks.

Declaration
public string Remarks { get; }
Property Value
Type Description
System.String

The remarks.

Type

Gets the type.

Declaration
public TableType Type { get; }
Property Value
Type Description
TableType

The type.

Methods

AddColumn(Column)

Declaration
public void AddColumn(Column column)
Parameters
Type Name Description
Column column

AddColumn(Column, String)

Declaration
public void AddColumn(Column column, string formula)
Parameters
Type Name Description
Column column
System.String formula

AddUniqueConstraint(String)

Declaration
public void AddUniqueConstraint(string columnName)
Parameters
Type Name Description
System.String columnName

ConvertSqlDataType2DbType(Int16)

Declaration
public static SqlDbType ConvertSqlDataType2DbType(short type)
Parameters
Type Name Description
System.Int16 type
Returns
Type Description
System.Data.SqlDbType

ConvertSqlDbType2Type(SqlDbType)

Declaration
public static Type ConvertSqlDbType2Type(SqlDbType type)
Parameters
Type Name Description
System.Data.SqlDbType type
Returns
Type Description
System.Type

ConvertSqlDbTypeToString(SqlDbType)

Declaration
public static string ConvertSqlDbTypeToString(SqlDbType type)
Parameters
Type Name Description
System.Data.SqlDbType type
Returns
Type Description
System.String

CreateDetachedTable(String, Column[])

Creates the detached table.

Declaration
public static Table CreateDetachedTable(string name, params Column[] columns)
Parameters
Type Name Description
System.String name

The name.

Column[] columns

The columns.

Returns
Type Description
Table

DropColumn(Column)

Declaration
public void DropColumn(Column column)
Parameters
Type Name Description
Column column

FillColumns(Table, ColumnCollection)

Fills the columns.

Declaration
protected static void FillColumns(Table table, ColumnCollection columns)
Parameters
Type Name Description
Table table
ColumnCollection columns

FillPK(Table, ColumnCollection)

Fills the PK.

Declaration
protected static void FillPK(Table table, ColumnCollection columns)
Parameters
Type Name Description
Table table
ColumnCollection columns

GetRelationships()

Declaration
public Relationship[] GetRelationships()
Returns
Type Description
Relationship[]

RefreshColumns()

Refreshes the columns.

Declaration
public void RefreshColumns()

ToString()

Returns a System.String that represents the current System.Object.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents the current System.Object.

Overrides
System.Object.ToString()

XmlDeserialize(String)

Deserializes Table object.

Declaration
public static Table XmlDeserialize(string str)
Parameters
Type Name Description
System.String str

The STR.

Returns
Type Description
Table

XmlSerialize(Table)

Serializes Table object.

Declaration
public static string XmlSerialize(Table item)
Parameters
Type Name Description
Table item

The item.

Returns
Type Description
System.String