✅ How to return List from RestClient?
Hi, I am making rest client for my application using RestSharp (like their twitter client in guide https://restsharp.dev/usage.html#api-client).
Everywhere in code I have something like But one endpoint returns just an array of entities and I don't like how
In TypeScript I could make alias
Also, should I use
P.S. Models (or DTO?) and client code are in separated files
Everywhere in code I have something like But one endpoint returns just an array of entities and I don't like how
Task<List<CoolerEntity2>> looksIn TypeScript I could make alias
type GetEntities = CoolerEntity2[] and use it. Is there something similar in C#?Also, should I use
ICollection instead of List?P.S. Models (or DTO?) and client code are in separated files