DTO Extensions
Extension class for manipulation with Data Transfer Objects on the application side - especially creation of DTOs from any class object.
If you want to get a DTO list directly from a database, follow this link: DTO Query Building
namespace KLO128.D3ORM.Common.Abstract
{
public static class DtoExtensions
}
Assembly
KLO128.D3ORM.Common.Abstract
Base Types
None
Properties
None
Methods
ToDTO<TDTO>()
public static TDTO ToDTO<TDTO>(this object entity) where TDTO : class, new()
Description
Extension for object: Converts an object into TDTO. The values of the properties with the same name (or id like name) belonging to the object are set into the target TDTO instance properties.
Return Type
TDTO
Type Parameters
TDTO : class, new()
Parameters
# | Name | Type | Description | Default Value |
---|---|---|---|---|
this | entity | object | object invoker |