Features create data object based on an existing
Прототипизация
- create data object on the basis of another.
Methods for prototypical DataObject
For prototypical DataObject there is a method Prototyping
.
/// <summary>
/// Prototypicality
/// </summary>
/// <param name="withDetails">detalaj or without</param>
public virtual void Prototyping(bool withDetails)
There is also an overload of this method without any parameters (in this case just made the call to the method Prototyping(true)
).
Prototypical DataObject
If prototypization the following actions occur:
- resets the primary key object (new generated);
- status is changed to
ObjectStatus.Created
; - download status object is set to
LoadingState.NotLoaded
; - a method is called InitDataCopy.
If the passed parameter has a value withDetails
true
, prototypical will be performed for all detailov.
notes proletarization
- Get a primary key object, which he had before prototypically, through property
PrototypeKey
. - Cleaning properties
PrototypeKey
happens when you call a methodClearPrototyping
(if the call was made with no parameters or the parameter value wastrue
, the corresponding property will be cleared and datalow). - Call method
ClearPrototyping(true)
also happens when saving an object via the SQLDataService. - To know whether prototipazione through the property
Prototyped
. - When you perform decide object the data service will carry out the proofreading properties prototipazione object, using as primary key
PrototypeKey
(but when you run UpdateObject in the database will create a new object).