Övning.Data.Util

An NDoc Documented Class Library

Övning.Data.Util Namespace

Namespace hierarchy

Classes

Class | Description
CommandFactory | This class creates commands.
DatabaseFieldAttribute | This attribute can be used on classes and properties. It tells the database layer where to save the data: in which table and column it has to be saved.
DB | The external interface to the databases.
PersistentObject | This class is the base class for al the objects that are persisted in the database. Hence the name.
SimpleQueryBuilder | Builds simple insert, update, delete and select queries.

Enumerations

Enumeration | Description
DatabaseFieldType | A list of possible database field types


CommandFactory Class

This class creates commands.

For a list of all members of this type, see CommandFactory Members.

System.Object
CommandFactory

public class CommandFactory

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Övning.Data.Util

Assembly: Övning.Data (in Övning.Data.dll)

See Also

CommandFactory Members | Övning.Data.Util Namespace


CommandFactory.AddParameterTo Method

Adds a parameter to a command.

public static void AddParameterTo(
IDbCommand command,
DbType type,
Object value
);

Parameters

IDbCommand
The command to add the parameter to.
DbType
The database type of the parameter. E.g. DbType.String.
Object
The value of the parameter.

Remarks

The parameter has no name, the parameters have to be added to a command in the correct order!

See Also

CommandFactory Class | Övning.Data.Util Namespace


CommandFactory.CreateCommand Method (String)

Creates a command with a specified command text.

public static IDbCommand CreateCommand(
String commandText
);

Parameters

String
The commands text

Return Value

A new command with a specified command text.

Remarks

This method is used for flexibility: if the databaseprovider must be changed, it is easy.

See Also

CommandFactory Class | Övning.Data.Util Namespace | CommandFactory.CreateCommand Overload List


CommandFactory.CreateCommand Method ()

Creates an empty command.

public static IDbCommand CreateCommand();

Return Value

An empty command, without a commandtext.

See Also

CommandFactory Class | Övning.Data.Util Namespace | CommandFactory.CreateCommand Overload List


CreateCommand Method

An NDoc Documented Class Library

CommandFactory.CreateCommand Method

Creates an empty command.

Overload List

Creates an empty command.

public static IDbCommand CreateCommand();

Creates a command with a specified command text.

public static IDbCommand CreateCommand(String);

See Also

CommandFactory Class | Övning.Data.Util Namespace


CommandFactory Members

CommandFactory overview

Public Static Methods

AddParameterTo | Adds a parameter to a command.
CreateCommand | Overloaded. Creates a command with a specified command text.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

CommandFactory Class | Övning.Data.Util Namespace


CommandFactory Methods

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

Public Static Methods

AddParameterTo | Adds a parameter to a command.
CreateCommand | Overloaded. Creates a command with a specified command text.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

CommandFactory Class | Övning.Data.Util Namespace


DatabaseFieldAttribute Class

This attribute can be used on classes and properties. It tells the database layer where to save the data: in which table and column it has to be saved.

For a list of all members of this type, see DatabaseFieldAttribute Members.

System.Object
Attribute
DatabaseFieldAttribute

public class DatabaseFieldAttribute : Attribute

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Requirements

Namespace: Övning.Data.Util

Assembly: Övning.Data (in Övning.Data.dll)

See Also

DatabaseFieldAttribute Members | Övning.Data.Util Namespace


DataType Property

An NDoc Documented Class Library

DatabaseFieldAttribute.DataType Property

The type of the column: string, datetime,...

public DataType {get;}

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace


FieldType Property

An NDoc Documented Class Library

DatabaseFieldAttribute.FieldType Property

The DatabaseFieldType of the field. A key, provided key or normal field.

public FieldType {get;}

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace


IsAutoGenerated Property

An NDoc Documented Class Library

DatabaseFieldAttribute.IsAutoGenerated Property

The field is autogenerated if the fieldType is Generated

public IsAutoGenerated {get;}

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace


IsKey Property

An NDoc Documented Class Library

DatabaseFieldAttribute.IsKey Property

The field is a key if the fieldtype is an autogeneratedkey or a userprovidedkey.

public IsKey {get;}

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace


Name Property

An NDoc Documented Class Library

DatabaseFieldAttribute.Name Property

The name of the field (table or column)

public Name {get;}

Property Value

Remarks

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace


DatabaseFieldAttribute Constructor

This constructor is only used for classes: it spacifies only the tablename.

Overload List

This constructor is only used for classes: it spacifies only the tablename.

public DatabaseFieldAttribute(String);

This constructor is for normal properties (not for key fields). It specifies a columname and a datatype.

public DatabaseFieldAttribute(String,DbType);

This constructor is for key fields and other special fields.

public DatabaseFieldAttribute(String,DbType,DatabaseFieldType);

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace


DatabaseFieldAttribute Constructor (String)

This constructor is only used for classes: it spacifies only the tablename.

public DatabaseFieldAttribute(
String name
);

Parameters

String
The name of the table.

Remarks

The rest of the values are default and should not be used.

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace | DatabaseFieldAttribute Constructor Overload List


DatabaseFieldAttribute Constructor (String, DbType)

This constructor is for normal properties (not for key fields). It specifies a columname and a datatype.

public DatabaseFieldAttribute(
String name,
DbType dataType
);

Parameters

String
The name of the column that represents the property in the table.
DbType
The dbType (e.g. DbType.String).

Remarks

The fieldType is DatabaseFieldType.ProvidedDataField.

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace | DatabaseFieldAttribute Constructor Overload List


DatabaseFieldAttribute Constructor (String, DbType, DatabaseFieldType)

This constructor is for key fields and other special fields.

public DatabaseFieldAttribute(
String name,
DbType dataType,
DatabaseFieldType fieldType
);

Parameters

String
The name of the column that represents the property in the table.
DbType
The dbType (e.g. DbType.String).
DatabaseFieldType
The fieldType.

Remarks

The fieldType is DatabaseFieldType.ProvidedDataField.

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace | DatabaseFieldAttribute Constructor Overload List


DatabaseFieldAttribute Members

DatabaseFieldAttribute overview

Public Instance Constructors

DatabaseFieldAttribute Overloaded. Initializes a new instance of the DatabaseFieldAttribute class.

Public Instance Properties

DataType | The type of the column: string, datetime,...
FieldType | The DatabaseFieldType of the field. A key, provided key or normal field.
IsAutoGenerated | The field is autogenerated if the fieldType is Generated
IsKey | The field is a key if the fieldtype is an autogeneratedkey or a userprovidedkey.
Name | The name of the field (table or column)
TypeId (inherited from Attribute) | When implemented in a derived class, gets a unique identifier for this Attribute.

Public Instance Methods

Equals (inherited from Attribute) | Returns a value that indicates whether this instance is equal to a specified object.
GetHashCode (inherited from Attribute) | Returns the hash code for this instance.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefaultAttribute (inherited from Attribute) | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
Match (inherited from Attribute) | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace


DatabaseFieldAttribute Properties

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

Public Instance Properties

DataType | The type of the column: string, datetime,...
FieldType | The DatabaseFieldType of the field. A key, provided key or normal field.
IsAutoGenerated | The field is autogenerated if the fieldType is Generated
IsKey | The field is a key if the fieldtype is an autogeneratedkey or a userprovidedkey.
Name | The name of the field (table or column)
TypeId (inherited from Attribute) | When implemented in a derived class, gets a unique identifier for this Attribute.

See Also

DatabaseFieldAttribute Class | Övning.Data.Util Namespace


DatabaseFieldType Enumeration

A list of possible database field types

public enum DatabaseFieldType

Remarks

Members

Member Name | Description
DatabaseGeneratedKey | Key that is generated by the database. E.g. incrementing index
DatabaseGeneratedDataField | Field that is set by the database automatically. (ignored when doing an insert into)
ProvidedKey | A key that is provided by the program: e.g. a unique random string.
ProvidedDataField | A regular datafield.

Requirements

Namespace: Övning.Data.Util

Assembly: Övning.Data (in Övning.Data.dll)

See Also

Övning.Data.Util Namespace


DB Class

The external interface to the databases.

For a list of all members of this type, see DB Members.

System.Object
DB

public class DB :

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Övning.Data.Util

Assembly: Övning.Data (in Övning.Data.dll)

See Also

DB Members | Övning.Data.Util Namespace


DB.Dispose Method

public void Dispose();

Implements

IDisposable.

See Also

DB Class | Övning.Data.Util Namespace


DB.Execute Method

Executes a command.

public int Execute(
IDbCommand command
);

Parameters

IDbCommand
The command (Insert, Update, Delete) to execute.

Return Value

The number of rows affected, except when an insert is done then it returns the new identifier.

Remarks

If an insert is done and the table has no primary key-field that is an integer zero(0) is returned.

See Also

DB Class | Övning.Data.Util Namespace


DB.Exists Method

Checks if one and only one object exists with the same properties

public bool <T>Exists(
IDbCommand readCommand
); where T: DefaultConstructorConstraint

Parameters

IDbCommand
The read command.

Return Value

True if there is an object with the same properties, false if there are none.

Exceptions

Exception Type | Condition
ArgumentException | if there are multiple objects with the same properties

See Also

DB Class | Övning.Data.Util Namespace


DB.Fill Method

Creates an object an sets its properties.

public T <T>Fill(
IDbCommand readCommand
); where T: DefaultConstructorConstraint

Parameters

IDbCommand
The command that queries the database for one row.

Return Value

An object with all its properties marked with the DatabaseFieldAttribute set.

Remarks

Exceptions

Exception Type | Condition
ArgumentException | When the readcommand does not returns exactly one row an ArgumentException is thrown

See Also

DB Class | Övning.Data.Util Namespace


DB.FillList Method

Fills a list of objects of a certain type by reading the DatabaseAttributes. The objects properties are set trough reflection.

public IList<T> <T>FillList(
IDbCommand readCommand
); where T: DefaultConstructorConstraint

Parameters

IDbCommand
The command that queries the database for zero or more rows.

Return Value

A list of objects with properties that are set.

Remarks

When a property has multiple attributes this method trows a invaldclasscastexception. The list contains zero elements if the query yields zero results.

See Also

DB Class | Övning.Data.Util Namespace


DB.OrganisationDatabase Method

Returns a reference to the database of a certain organisation.

public static DB OrganisationDatabase(
String organisationLicenseNumber
);

Parameters

String
The licensenumber of the organisation of which the database has to be fetched.

Return Value

A reference to the organisations database

Remarks

This method does not check if the database exists. It returns a DB object with a closed connection to the organisation.

See Also

DB Class | Övning.Data.Util Namespace


DB.Read Method

Reads a datatable from the database.

public DataTable Read(
IDbCommand command
);

Parameters

IDbCommand
A command to execute

Return Value

A datatable with the values

See Also

DB Class | Övning.Data.Util Namespace


SystemDatabase Property

An NDoc Documented Class Library

DB.SystemDatabase Property

Returns the only instance of the System Database.

public static SystemDatabase {get;}

See Also

DB Class | Övning.Data.Util Namespace


DB Members

DB overview

Public Static Properties

SystemDatabase Returns the only instance of the System Database.

Public Static Methods

OrganisationDatabase Returns a reference to the database of a certain organisation.

Public Instance Methods

Dispose |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Execute | Executes a command.
Exists | Checks if one and only one object exists with the same properties
Fill | Creates an object an sets its properties.
FillList | Fills a list of objects of a certain type by reading the DatabaseAttributes. The objects properties are set trough reflection.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Read | Reads a datatable from the database.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

DB Class | Övning.Data.Util Namespace


DB Methods

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

Public Static Methods

OrganisationDatabase Returns a reference to the database of a certain organisation.

Public Instance Methods

Dispose |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Execute | Executes a command.
Exists | Checks if one and only one object exists with the same properties
Fill | Creates an object an sets its properties.
FillList | Fills a list of objects of a certain type by reading the DatabaseAttributes. The objects properties are set trough reflection.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Read | Reads a datatable from the database.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

DB Class | Övning.Data.Util Namespace


DB Properties

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

Public Static Properties

SystemDatabase Returns the only instance of the System Database.

See Also

DB Class | Övning.Data.Util Namespace


PersistentObject Class

This class is the base class for al the objects that are persisted in the database. Hence the name.

For a list of all members of this type, see PersistentObject Members.

System.Object
PersistentObject

public class PersistentObject

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Övning.Data.Util

Assembly: Övning.Data (in Övning.Data.dll)

See Also

PersistentObject Members | Övning.Data.Util Namespace


PersistentObject.Create Method

Persists this object in the system database and returns its new identity

public virtual int Create();

Return Value

The new Identity

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject.Delete Method

Deletes the object from the systemdatabase.

public virtual void Delete();

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject.Exists Method

protected static bool <T>Exists(
PersistentObject objectToCheck
); where T: DefaultConstructorConstraint, PersistentObject

See Also

PersistentObject Class | Övning.Data.Util Namespace


Map Property

An NDoc Documented Class Library

PersistentObject.Map Property

A map of Dirty properties: these properties are changed and not persisted in the database.

public Map {get;}

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject.Read Method

protected static PersistentObject <T>Read(
PersistentObject objectToRead
); where T: DefaultConstructorConstraint, PersistentObject

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject.ReadAll Method

protected static IList<T> <T>ReadAll(); where T: DefaultConstructorConstraint, PersistentObject

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject.SetDirty Method

Sets a property as dirty: it is changed and not persisted in the database.

protected void SetDirty(
String propertyName
);

Parameters

String
The name of the property that has to be set as dirty.

Remarks

This is neccessary to prevent the database to overwrite existing values with nothing.

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject.Update Method

Updates the object in the systemdatabase.

public virtual void Update();

Remarks

The number of rows affected.

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject Constructor

Initializes a new instance of the PersistentObject class.

protected PersistentObject();

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject Members

PersistentObject overview

Protected Static Methods

Exists
Read
ReadAll

Public Instance Properties

Map A map of Dirty properties: these properties are changed and not persisted in the database.

Public Instance Methods

Create | Persists this object in the system database and returns its new identity
Delete | Deletes the object from the systemdatabase.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
Update | Updates the object in the systemdatabase.

Protected Instance Constructors

PersistentObject Constructor Initializes a new instance of the PersistentObject class.

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.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
SetDirty | Sets a property as dirty: it is changed and not persisted in the database.

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject Methods

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

Protected Static Methods

Exists
Read
ReadAll

Public Instance Methods

Create | Persists this object in the system database and returns its new identity
Delete | Deletes the object from the systemdatabase.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
Update | Updates the object in the systemdatabase.

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.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
SetDirty | Sets a property as dirty: it is changed and not persisted in the database.

See Also

PersistentObject Class | Övning.Data.Util Namespace


PersistentObject Properties

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

Public Instance Properties

Map A map of Dirty properties: these properties are changed and not persisted in the database.

See Also

PersistentObject Class | Övning.Data.Util Namespace


SimpleQueryBuilder Class

Builds simple insert, update, delete and select queries.

For a list of all members of this type, see SimpleQueryBuilder Members.

System.Object
SimpleQueryBuilder

public class SimpleQueryBuilder

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The queries are wrapped in a IDbCommand interface with its parameters filled out.

Requirements

Namespace: Övning.Data.Util

Assembly: Övning.Data (in Övning.Data.dll)

See Also

SimpleQueryBuilder Members | Övning.Data.Util Namespace


SimpleQueryBuilder.AddWhereClauseToReadAllCommand Method

Adds a special where clause to a readall command

public IDbCommand AddWhereClauseToReadAllCommand(
IDbCommand readAllCommand,
String propertyName,
IList<T> list
);

Parameters

IDbCommand
The command that does a readall
String
The property to constrain.
IList<T>
The possible values of the property

Return Value

An readall command with a custom where clause.

Remarks

Is not dynamic for the moment.

See Also

SimpleQueryBuilder Class | Övning.Data.Util Namespace


SimpleQueryBuilder.GenerateDeleteCommandFor Method

Generates a delete command for an object. It uses the same where clause as the GenerateReadCommandFor.

public IDbCommand GenerateDeleteCommandFor(
PersistentObject itemToDelete
);

Parameters

PersistentObject
The item to delete.

Return Value

A delete command with parameters and a commandtext

See Also

SimpleQueryBuilder Class | Övning.Data.Util Namespace


SimpleQueryBuilder.GenerateInsertCommandFor Method

Generates an insert command for an object with DatabaseField attributes.

public IDbCommand GenerateInsertCommandFor(
PersistentObject itemToInsert
);

Parameters

PersistentObject
The object an insertcommand has to be generated for.

Return Value

A parameterized insert command with filled parameters.

Remarks

It automagically leaves out the fields that are generated by the database.

See Also

SimpleQueryBuilder Class | Övning.Data.Util Namespace


SimpleQueryBuilder.GenerateReadAllCommandFor Method

Generates a Select * from command for an object.

public IDbCommand GenerateReadAllCommandFor(
PersistentObject itemToQuery
);

Parameters

PersistentObject
The object to generate the command for.

Return Value

A command with a CommandText.

See Also

SimpleQueryBuilder Class | Övning.Data.Util Namespace


SimpleQueryBuilder.GenerateReadCommandFor Method

Generates a Select...Where query for one or multiple objects.

public IDbCommand GenerateReadCommandFor(
PersistentObject itemToRead
);

Parameters

PersistentObject
The object to read.

Return Value

A command with parameters.

Remarks

The objects key is used in the where clause. If the key is empty (nothing or the default value) then all the dirty fields are used in the where clause. In this example we fetch all the persons with the first name John and last name Smith and write them to the console: Person p = new Person(); p.Name="John"; p.LastName="Smith"; IDbCommand command = new SimpleQueryBuilder().GenerateReadCommandFor(p); for each( result as Person in DB.Read(command)) Console.WriteLine(string.Format("{0} {1}",p.Identifier,p.Name);

See Also

SimpleQueryBuilder Class | Övning.Data.Util Namespace


SimpleQueryBuilder.GenerateUpdateCommandFor Method

Generates an updatecommand for an object with databasefield attributes.

public IDbCommand GenerateUpdateCommandFor(
PersistentObject itemToUpdate
);

Parameters

PersistentObject
The object to generate an updatecommand for

Return Value

A parameterized updatecommand with filled parameters

Remarks

The objects key is used in the where clause. If the key is empty nothing gets updated.

See Also

SimpleQueryBuilder Class | Övning.Data.Util Namespace


SimpleQueryBuilder Constructor

Initializes a new instance of the SimpleQueryBuilder class.

public SimpleQueryBuilder();

See Also

SimpleQueryBuilder Class | Övning.Data.Util Namespace


SimpleQueryBuilder Members

SimpleQueryBuilder overview

Public Instance Constructors

SimpleQueryBuilder Constructor Initializes a new instance of the SimpleQueryBuilder class.

Public Instance Methods

AddWhereClauseToReadAllCommand | Adds a special where clause to a readall command
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GenerateDeleteCommandFor | Generates a delete command for an object. It uses the same where clause as the GenerateReadCommandFor.
GenerateInsertCommandFor | Generates an insert command for an object with DatabaseField attributes.
GenerateReadAllCommandFor | Generates a Select * from command for an object.
GenerateReadCommandFor | Generates a Select...Where query for one or multiple objects.
GenerateUpdateCommandFor | Generates an updatecommand for an object with databasefield attributes.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

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.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

SimpleQueryBuilder Class | Övning.Data.Util Namespace


SimpleQueryBuilder Methods

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

Public Instance Methods

AddWhereClauseToReadAllCommand | Adds a special where clause to a readall command
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GenerateDeleteCommandFor | Generates a delete command for an object. It uses the same where clause as the GenerateReadCommandFor.
GenerateInsertCommandFor | Generates an insert command for an object with DatabaseField attributes.
GenerateReadAllCommandFor | Generates a Select * from command for an object.
GenerateReadCommandFor | Generates a Select...Where query for one or multiple objects.
GenerateUpdateCommandFor | Generates an updatecommand for an object with databasefield attributes.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

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.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

SimpleQueryBuilder Class | Övning.Data.Util Namespace


Hierarchy

System.Object
Övning.Data.Util.CommandFactory
Övning.Data.Util.DB ---- System.IDisposable
Övning.Data.Util.PersistentObject
Övning.Data.Util.SimpleQueryBuilder
System.Attribute
Övning.Data.Util.DatabaseFieldAttribute
System.ValueType
System.Enum ---- System.IComparable, System.IConvertible, System.IFormattable
Övning.Data.Util.DatabaseFieldType

See Also

Övning.Data.Util Namespace