This is the base class from which most business objects will be derived. To create a business object, inherit from this class.

Namespace: BlogEngine.Core
Assembly:  BlogEngine.Core (in BlogEngine.Core.dll)
Version: 1.2.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 
[SerializableAttribute]
public abstract class BusinessBase<TYPE, KEY> : IDisposable where TYPE : new(), BusinessBase<TYPE, KEY>
<SerializableAttribute> _
Public MustInherit Class BusinessBase(Of TYPE As {New, BusinessBase(Of TYPE, KEY)}, KEY) _
	Implements IDisposable
[SerializableAttribute]
generic<typename TYPE, typename KEY>
where TYPE : gcnew(), BusinessBase<TYPE, KEY>
public ref class BusinessBase abstract : IDisposable

Type Parameters

TYPE
The type of the derived class.
KEY
The type of the Id property.

Members

               
 All Members  Constructors Public method  Properties Public property  Methods Public method  Events Public event 
 Public

 Protected
 Instance

 Static Static member
 Declared

 Inherited
 XNA Framework Only Supported by the XNA Framework

 .NET Compact Framework Only Supported by the .NET Compact Framework

 MemberDescription
Protected methodBusinessBase<(Of <TYPE, KEY>)>BusinessBase<(Of <TYPE, KEY>)>New()()
Protected methodAddRule(String, String, Boolean)
Add or remove a broken rule.
Protected methodDataDelete()()
Deletes the object from the data store.
Protected methodDataInsert()()
Inserts a new object to the data store.
Protected methodDataSelect(KEY)
Retrieves the object from the data store and populates it.
Protected methodDataUpdate()()
Updates the object in its data store.
Public propertyDateCreated
The date on which the instance was created.
Public propertyDateModified
The date on which the instance was modified.
Public methodDelete()()
Marks the object for deletion. It will then be deleted when the object's Save() method is called.
Protected propertyDirtyProperties
A collection of the properties that have been marked as being dirty.
Public methodDispose()()
Disposes the object and frees ressources for the Garbage Collector.
Protected methodDispose(Boolean)
Disposes the object and frees ressources for the Garbage Collector.
Public methodStatic memberEquality(BusinessBase<(Of <TYPE, KEY>)>, BusinessBase<(Of <TYPE, KEY>)>)
Checks to see if two business objects are the same.
Public methodEquals(Object)
Comapares this object with another
(Overrides Object..::Equals(Object).)
Protected methodFinalize()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode()()
A uniquely key to identify this particullar instance of the class
(Overrides Object..::GetHashCode()().)
Public methodGetType()()
Gets the Type of the current instance.
(Inherited from Object.)
Public propertyId
Gets the unique Identification of the object.
Public methodStatic memberInequality(BusinessBase<(Of <TYPE, KEY>)>, BusinessBase<(Of <TYPE, KEY>)>)
Checks to see if two business objects are different.
Public propertyIsDeleted
Gets if this object is marked for deletion.
Public propertyIsDirty
Gets if this object's data has been changed.
Protected propertyIsDisposed
Gets or sets if the object has been disposed.

Remarks

If the objects is disposed, it must not be disposed a second time. The IsDisposed property is set the first time the object is disposed. If the IsDisposed property is true, then the Dispose() method will not dispose again. This help not to prolong the object's life if the Garbage Collector.
Public propertyIsNew
Gets if this is a new object, False if it is a pre-existing object.
Protected methodIsPropertyDirty(String)
Check whether or not the specified property has been changed
Protected methodIsPropertyDirty(array<String>[]())
Check whether or not the specified properties has been changed
Public propertyIsValid
Gets whether the object is valid or not.
Public methodStatic memberLoad(KEY)
Loads an instance of the object based on the Id.
Protected methodMarkDirty(String)
Marks an object as being dirty, or changed.
Public eventMarkedDirty
Occurs when this instance is marked dirty. It means the instance has been changed but not saved.
Public methodMarkOld()()
Marks the object as being an clean, which means not dirty.
Protected methodMemberwiseClone()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnMarkedDirty()()
Raises the MarkedDirty event safely.
Protected methodStatic memberOnSaved(BusinessBase<(Of <TYPE, KEY>)>, SaveAction)
Raises the Saved event.
Protected methodStatic memberOnSaving(BusinessBase<(Of <TYPE, KEY>)>, SaveAction)
Raises the Saving event
Public methodSave()()
Saves the object to the database.
Public eventStatic memberSaved
Occurs when the class is Saved
Public eventStatic memberSaving
Occurs when the class is Saved
Public methodToString()()
Returns a String that represents the current Object.
(Inherited from Object.)
Public propertyValidationMessage
If the object has broken business rules, use this property to get access to the different validation messages.
Protected methodValidationRules()()
Reinforces the business rules by adding additional rules to the broken rules collection.

Inheritance Hierarchy

System..::Object
  BlogEngine.Core..::BusinessBase<(Of <TYPE, KEY>)>
    BlogEngine.Core..::Category
    BlogEngine.Core..::Post
    BlogEngine.Core..::Page

See Also

BlogEngine.Core Namespace