Shunde.NET Framework Class Library

DBObject.GetObject Method (String)

Gets and populates a single DBObject

public static DBObject GetObject(
   String query
);

Parameters

String

Return Value

Returns a fully populated DBObject

Remarks

This is a useful method when you do not know the type of object you will get back. Just pass in a SQL statement that returns one id.

Exceptions

Exception Type Condition
ValidationException Thrown if the query returns more than one row.
ObjectDoesNotExistException Thrown if the specified ID is not found in the database.

See Also

DBObject Class | Shunde.Framework Namespace | DBObject.GetObject Overload List