EasyObjects.NET Programmers Reference

EasyObject Methods

The methods of the EasyObject class are listed below. For a complete list of EasyObject class members, see the EasyObject Members topic.

Public Instance Methods

AcceptChanges Commits all the changes in the internal DataTable since the last time AcceptChanges was called.
AddColumn After loading your BusinessEntity you can add custom columns, this is typically done to create a calculated column, however, it can be used to add a column just to hold state, it will not be saved to the database of course.
AddNew Adds a new row to the internal DataTable.
DeleteAll Marks every row in the internal DataTable as deleted.
Deserialize Reload an EasyObject from a previous call to Serialize.
Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
FlushData Resets the EasyObject to an empty state.
FromXmlOverloaded. Reload the EasyObject from a previous call to ToXml. Use the mode parameter for finer control.
GetChangesOverloaded. Gets a copy of internal DataTable containing all the changes to it since it was last loaded, or since AcceptChanges was last called.
GetColumn This is the typeless version, this method should only be used for columns that you added via AddColumn or to access extra columns brought back by changing your QuerySource to a SQL View.
GetDatabase Get the database defined in the configuration file.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetItemStringOverloaded. Retrieves the string value of the SchemaItem
GetProperties Retrieves the list of the object's properties using reflection and returns them in an array
GetPropertyByNamedValue Retrieves the value of a property using the name via reflection
GetType (inherited from Object) Gets the Type of the current instance.
IsColumnNull Checks if a particular column in the EasyObject has a null value.
LoadOverloaded. Loads the internal DataTable with the named table in a DataSet.
MarkAsDeleted Marks the current row in the internal DataTable as deleted.
MoveNext Moves the current row of internal DataTable.
RejectChanges Rolls back the internal DataTable to the state is was in when it was loaded, or the last time AcceptChanges was called.
Rewind Resets the internal DataTable to the first row.
RowState Gets the current state of the current row in the internal DataTable.
SaveOverloaded. Overload to save with a default
Serialize This method will allow you to save the contents of the EasyObject to XML. It is saved as a DataSet with Schema, data, and Rowstate as a DiffGram. You can load this data into another entity of the same type via Deserialize. Call GetChanges before calling Serialize to serialize only the modified data.
SetColumn This is the typeless version, this method should only be used for columns that you added via AddColumn or to access extra columns brought back by changing your QuerySource to a SQL View.
SetColumnNull Use this method to set a column to DBNull.Value which will translate to NULL in your DBMS system.
SetItem Sets the value for a SchemaItem in the internal DataTable.
SetProperty Sets a property value using the property name via reflection
ToString (inherited from Object) Returns a String that represents the current Object.
ToXmlOverloaded. This method will allow you to save the contents of the EasyObject to XML. You can load this data into another EasyObject of the same type via FromXml. Call GetChanges before calling ToXml to serialize only the modified data.

Protected Instance Methods

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
GetBoolAsString Used by the String Properties in your generated class.
GetBoolean Used by the Properties in your generated class.
GetBooleanAsString Used by the String Properties in your generated class.
GetByte Used by the Properties in your generated class.
GetByteArray Used by the Properties in your generated class.
GetByteAsString Used by the String Properties in your generated class.
GetDateTime Used by the Properties in your generated class.
GetDateTimeAsString Used by the String Properties in your generated class.
GetDecimal Used by the Properties in your generated class.
GetDecimalAsString Used by the String Properties in your generated class.
GetDeleteCommandOverloaded. Used by derived classes
GetDouble Used by the Properties in your generated class.
GetDoubleAsString Used by the String Properties in your generated class.
GetFloat Used by the Properties in your generated class.
GetFloatAsString Used by the String Properties in your generated class.
GetGuid Used by the Properties in your generated class.
GetGuidAsString Used by the String Properties in your generated class.
GetInsertCommandOverloaded. Used by derived classes
GetInt32 Used by the Properties in your generated class.
GetIntAsString Used by the String Properties in your generated class.
GetInteger Used by the Properties in your generated class.
GetIntegerAsString Used by the String Properties in your generated class.
GetLong Used by the Properties in your generated class.
GetLongAsString Used by the String Properties in your generated class.
GetObject Used by the Properties in your generated class.
GetShort Used by the Properties in your generated class.
GetShortAsString Used by the String Properties in your generated class.
GetSingle Used by the Properties in your generated class.
GetSingleAsString Used by the String Properties in your generated class.
GetString Used by the Properties in your generated class.
GetStringAsString Used by the String Properties in your generated class.
GetTimeSpan Used by the Properties in your generated class.
GetTimeSpanAsString Used by the String Properties in your generated class.
GetUpdateCommandOverloaded. Used by derived classes
LoadFromSqlOverloaded. Load the EasyObject with the results from a SQL query or stored procedure.
LoadFromSqlNoExecOverloaded. Execute a SQL query or stored procedure without affecting the EasyObject.
LoadFromSqlReaderOverloaded. Return an IDataReader from a SQL query or stored procedure without affecting the EasyObject.
LoadFromSqlScalarOverloaded. Return a value from a SQL query or stored procedure without affecting the EasyObject.
LSet Mimics the old VB LSet function, which places a value within a padded string of a defined length.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
PostSave Perform any operations to the EasyObject after saving.
PreSave Perform any operations to the EasyObject before saving.
RSet Mimics the old VB RSet function, which places a value within a padded string of a defined length.
SetBoolAsString Used by the String Properties in your generated class.
SetBoolean Used by the Properties in your generated class
SetBooleanAsString Used by the String Properties in your generated class.
SetByte Used by the Properties in your generated class
SetByteArray Used by the Properties in your generated class
SetByteAsString Used by the String Properties in your generated class.
SetDateTime Used by the Properties in your generated class
SetDateTimeAsString Used by the String Properties in your generated class.
SetDecimal Used by the Properties in your generated class
SetDecimalAsString Used by the String Properties in your generated class.
SetDouble Used by the Properties in your generated class
SetDoubleAsString Used by the String Properties in your generated class.
SetFloat Used by the Properties in your generated class
SetFloatAsString Used by the String Properties in your generated class.
SetGuid Used by the Properties in your generated class
SetGuidAsString Used by the String Properties in your generated class.
SetInt32 Used by the Properties in your generated class
SetIntAsString Used by the String Properties in your generated class.
SetInteger Used by the Properties in your generated class
SetIntegerAsString Used by the String Properties in your generated class.
SetLong Used by the Properties in your generated class
SetLongAsString Used by the String Properties in your generated class.
SetObject Used by the Properties in your generated class
SetShort Used by the Properties in your generated class
SetShortAsString Used by the String Properties in your generated class.
SetSingle Used by the Properties in your generated class
SetSingleAsString Used by the String Properties in your generated class.
SetStringOverloaded. Used by the Properties in your generated class
SetStringAsString Used by the String Properties in your generated class.
SetTimeSpan Used by the Properties in your generated class
SetTimeSpanAsString Used by the String Properties in your generated class.

See Also

EasyObject Class | NCI.EasyObjects Namespace