Skip to content

DTOs

Data Transfer Objects, or DTOs, allow for transformations of data from the data store into a format more suited for transfer and use on the client side. This often means trimming properties and flattening structures to provide a leaner over-the-wire experience. Coalesce aims to support this as seamlessly as possible.

Coalesce supports two types of DTOs:

Automatically Generated DTOs

Every class that is exposed through Coalesce's generated API will have a corresponding DTO generated for it. These DTOs are used to shuttle data back and forth to the client. They are generated classes that have nullable versions of all the properties on the POCO class.

The [Read], [Edit], and [Restrict] attributes can be used to apply property-level security, which manifests as conditional logic in the mapping methods on the generated DTOs. These attributes are enforced in the mapping operations to and from the generated DTO.

See the Security page to read more about property-level security, as well as all other security mechanisms in Coalesce.

[DtoIncludes] & [DtoExcludes] can be used to indicate which properties should be transferred to the client in which cases, and Include Trees are used to dictate how these DTOs are shaped when mapping from your domain objects. Do note that these are not security features.


Coalesce is a free and open-source framework created by IntelliTect to fill our desire to create better apps, faster. IntelliTect is a high-end software architecture and development consulting firm based in Spokane, Washington.

If you're looking for help with your software project, whether it be a Coalesce application, other technologies, or even just an idea, reach out to us at info@intellitect.com — we'd love to start a conversation! Our clients range from Fortune 100 companies to local small businesses and non-profits.