TechTalk Genome v4.2

IDataDomain.New<T> Method (Object[])

Creates a new instance of a persistent type in this DataDomain. The transaction context of the active Context in the calling thread is used for the operation.

T New<T>(
   params object[] parameters
);

Type Parameters

T
A Type that is concrete, persistent and supported by the DataDomainSchema of this DataDomain.

Parameters

parameters
An object array consisting of zero or more argument values for the constructor of type. If type has overloaded constructors, the matching overload is disambiguated during execution time based on the dynamic type of the parameters.

Return Value

An unbound proxy to the newly created persistent object.

Exceptions

Exception TypeCondition
GenomeException

The calling thread does not have an active Context.

GenomeException Thrown if type does not denote a persistent type in the DataDomainSchema of this DataDomain.
SchemaException

Thrown if type does not denote a concrete type (but an abstract class).

or

if any of the fields participating in the identity strategy of type defined by the DataDomainSchema of this DataDomain are a null reference.

Requirements

Namespace: TechTalk.Genome

Assembly: TechTalk.Genome (in TechTalk.Genome.dll)

Version: 4.2.4.4

Editions: Professional, Evaluation, Express

See Also

IDataDomain Interface | TechTalk.Genome Namespace | IDataDomain.New<T> Overload List | Context.Current