Creates a new instance of the DTO.
public object CreateNew()
Creates a new instance of the DTO, assigning properties with the specified names to the specified values.
public object CreateNew(IEnumerable<(IDtoProperty Property, object? Value)> propertyValues)
parameter | description |
---|---|
propertyValues | The property names and values. |
If possible, the instance is created with the public default constructor, after which the specified properties (if any) are set to the specified values. If there is no public default constructor and/or one or more of the specified properties are read-only, the instance is created with a public constructor whose parameters match the properties of the DTO.