3 ms·
List<Type> or similar means you're creating a lot of types in a large project. Specifically you're making a ton of Dtos or similar objects just to bundle value
by Someone1234 9y ago
List<Type> or similar means you're creating a lot of types in a large project.
Specifically you're making a ton of Dtos or similar objects just to bundle values together and transfer them between layers. You can use anonymous objects, but then the return type is simply "object", which isn't descriptive enough. Plus anonymous objects are flagged to not cross assembly boundaries without wild hacks.
Tuples work in situations where you'd otherwise use a small Dto, which is then combined with a larger Dto further up the food chain. And since it is self-descriptive you're not losing much clarity over the small Dto.