Show / Hide Table of Contents

Class Model

Base class of your busines model objects.

Inheritance
System.Object
AddonBag
ModelMember
Model
Adhoc
Model<T>
TabularText
KeyOutput
Implements
IModels
System.Collections.Generic.IReadOnlyCollection<Model>
System.Collections.Generic.IEnumerable<Model>
System.Collections.IEnumerable
IEntity
Inherited Members
ModelMember.GetParent()
ModelMember.VerifyDesignMode()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: DevZest.Data
Assembly: DevZest.Data.dll
Syntax
public abstract class Model : ModelMember, IDesignable, IModels, IReadOnlyCollection<Model>, IEnumerable<Model>, IEnumerable, IEntity

Constructors

Name Description
Model()

Initializes a new instance of Model class.

Properties

Name Description
ChildModels

Gets the child models owned by this model.

Columns

Gets the columns owned by this model.

DataSet

Gets the DataSet which owns this model.

DataSetContainer

Gets the DataSet container which owns this model.

DataSource

Gets the DataSource which owns this model.

DbAlias

Gets the database alias of this model.

DesignMode
IsInitialized

Gets a value indicates whether child models are initialized.

LocalColumns

Gets local columns owned by this model.

PrimaryKey

Gets the primary key of this model.

Projections

Gets the Projection objects owned by this model.

Validators

Gets the validators owned by this model.

Methods

Name Description
AddDbCheckConstraint(String, String, _Boolean)

Adds database check constraint.

AddDbIndex(String, String, Boolean, Boolean, Boolean, Boolean, ColumnSort[])

Adds database index.

AddDbUniqueConstraint(String, String, Boolean, ColumnSort[])

Adds database unique constraint.

CreateDataSet<T>(_DataSet<T>, Int32)

Creates a DataSet.

CreateLocalColumn<T>()

Creates a local column.

EnsureInitialized()

Ensures child models are initialized.

GetChildModels()

Gets the child models owned by this model.

GetColumnLists()

Gets the column lists owned by this model.

GetColumns()

Gets the columns owned by this model.

GetDataSet()

Gets the DataSet which owns this model.

GetDataSource()

Gets the DataSource which owns this model.

GetDepth()

Gets the depth of this nested model.

GetIdentity(Boolean)

Gets identity definition of the table.

GetLocalColumns()

Gets the local columns owned by this model.

GetName()

Gets the name of this model.

GetOrdinal()

Gets the ordinal of this child model.

OnAfterDataRowInserted(DataRowEventArgs)

Raises AfterDataRowInserted event.

OnBeforeDataRowInserted(DataRowEventArgs)

Raises BeforeDataRowInserted event.

OnChildDataSetsCreated()

Raises ChildDataSetsCreated event.

OnChildModelsMounted()

Raises ChildModelsMounted event.

OnConstructing()

Raises Constructing event.

OnDataRowInserting(DataRowEventArgs)

Raises DataRowInserting event.

OnDataRowRemoved(DataRowRemovedEventArgs)

Raises DataRowRemoved event.

OnDataRowRemoving(DataRowEventArgs)

Raises DataRowRemoving event.

OnInitialized()

Raises Initialized event.

OnInitializing()

Raises Initializing event.

OnValueChanged(ValueChangedEventArgs)

Raises ValueChanged event.

RegisterChildModel<TModel, TChildModel>(Expression<Func<TModel, TChildModel>>, Func<TModel, TChildModel>)

Registers a child model.

RegisterColumn<TModel, TColumn>(Expression<Func<TModel, TColumn>>)

Registers a new column which has a default constructor.

RegisterColumn<TModel, TColumn>(Expression<Func<TModel, TColumn>>, Mounter<TColumn>)

Registers a column from existing column mounter.

RegisterColumnList<TModel, T>(Expression<Func<TModel, ColumnList<T>>>)

Registers a column list.

RegisterLocalColumn<TModel, T>(Expression<Func<TModel, LocalColumn<T>>>)

Registers a new local column.

RegisterProjection<TModel, TProjection>(Expression<Func<TModel, TProjection>>)

Registers a new Projection.

ToString()
Validate(DataRow)

Validates specified DataRow.

Events

Name Description
AfterDataRowInserted

Occurs after DataRow inserted.

BeforeDataRowInserted

Occurs before DataRow inserted.

ChildDataSetsCreated

Occurs when child DataSets are created.

ChildModelsMounted

Occurs when child models are mounted.

Constructing

Occurs when this model is constructing.

DataRowInserting

Occurs when inserting DataRow.

DataRowRemoved

Occurs when DataRow is removed.

DataRowRemoving

Occurs when removing DataRow.

Initialized

Occurs when this model is initialized.

Initializing

Occurs when this model is initializing.

ValueChanged

Ocurrs when data value is changed.

Explicit Interface Implementations

Name Description
IEntity.Model
IModels.Add(Model)
IModels.Clear()
IModels.Contains(Model)
IModels.IsSealed
IModels.Remove(Model)
IModels.Seal()
IEnumerable<Model>.GetEnumerator()
IReadOnlyCollection<Model>.Count
IEnumerable.GetEnumerator()

Extension Methods

Models.Except(IModels, IModels)
Models.Intersect(IModels, IModels)
Models.ContainsAny(IModels, IModels)
Models.IsProperSubsetOf(IModels, IModels)
Models.IsProperSupersetOf(IModels, IModels)
Models.IsSubsetOf(IModels, IModels)
Models.IsSupersetOf(IModels, IModels)
Models.Overlaps(IModels, IModels)
Models.SetEquals(IModels, IModels)
Models.SymmetricExcept(IModels, IModels)
Models.Union(IModels, IModels)
AddonBagExtensions.GetAddons<T>(AddonBag)
AddonBagExtensions.GetAddon<T>(AddonBag)
AddonBagExtensions.GetAddon(AddonBag, Object)
AddonBagExtensions.Add(AddonBag, IAddon)
AddonBagExtensions.AddOrUpdate(AddonBag, IAddon)
AddonBagExtensions.ContainsAddon(AddonBag, Object)
AddonBagExtensions.RemoveAddon(AddonBag, Object)
ModelExtensions.GetDbAlias(Model)
ModelExtensions.AddSystemColumn(Model, Column, String, Action<Column>)
ModelExtensions.GetDbTableClause(Model)
ModelExtensions.GetTableRowIdColumn(Model)
ModelExtensions.GetInsertableColumns(Model)
ModelExtensions.GetUpdatableColumns(Model)
ModelExtensions.GetDbTableName(Model)
ModelExtensions.GetDbTableDescription(Model)
ModelExtensions.IsIdentitySuspended(Model)
ModelExtensions.SuspendIdentity(Model)
ModelExtensions.ResumeIdentity(Model)
ModelExtensions.GetParentRelationship(Model)
ModelExtensions.GetDataSource(Model)
BindingFactory.BindToCheckBox(Model)
BindingFactory.BindTo<T>(Model)
BindingFactory.BindToValidationErrorsControl(Model)
BindingFactory.BindToTextBlock(Model, String)
  • Improve this Doc
  • View Source
Back to top Copyright © Weifen Luo | DevZest