Records simplify the creation and maintenance of DTOs by reducing boilerplate.
In legacy systems, DTOs often require a lot of boilerplate code for constructors, getters, and standard methods. With records, all of this can be generated automatically. For example, a `record Order(int id, double total)` replaces a verbose class definition, making the code easier to read and maintain.
Additional Notes
How do Java Records enhance data transfer objects (DTOs)?