Record types
Can your data type be a value type? Go with struct
. No? Does your type describe a value-like, preferably immutable state and is used in unidirectional (one way) flow? Go with record
.
Use class
otherwise. So...
- Yes, use
record
s for your DTOs if it is one way flow. - Yes, immutable request bindings are an ideal user case for a
record
public record MyDto(string FirstName, string LastName) : IMyBase;