Skip to content

Contracts Layer

Project: KeDevO.YardPro.Contracts Type: .NET 10.0 Class Library

Defines the Data Transfer Objects (DTOs) — the communication contract between API, Web, and external consumers.

DTO Catalog

Authentication — Auth/

AuthDto — Login request/response

Vehicles — Vehicles/

VehicleDto, VehicleCreateDto, VehicleUpdateDto

Parts — Parts/

PartDto, PartCreateDto, PartUpdateDto

Invoices — Invoices/

InvoiceDto — Invoice + lines + payments

Customers — Customers/

CustomerDto, CustomerCreateDto, CustomerUpdateDto

Workers — Workers/

WorkerDto, WorkerCreateDto, WorkerUpdateDto

Interchange — Interchange/

InterchangeGroupDto, InterchangeRequests, OEMPartNumberDto, VehicleSearchDto

Other DTOs

CarApiVehicleDto, CompanyDto, PartLabelDto, VehicleMakeDto, FacebookAccountDto, LogEntryDto, RoleLicenseDto, StorageLocationDto, YardLocationDto, MediaAssetDto

Naming Conventions

  • {Entity}Dto — Read model
  • {Entity}CreateDto — Create command
  • {Entity}UpdateDto — Update command

Design Principles

  1. One DTO per concern
  2. Keep DTOs serializable
  3. Match API contracts — changing a DTO is a breaking change
  4. Nullable types for optional fields