Client API design question


Whilst implementing the ability to manage users in the client API, I was looking at the existing code to manage projections.

I noticed that methods such as UserManager.ListAllAsync return a Task. Would it be worth creating a class to return rather than returning a string representation of an array? Or, was this a design decision that was made early on.

Any reasons/pointers welcome.

Kind regards


A class is in general better unless it’s just returning say a list of usernames. Even then it’s probably better as there is some amount of validation on he other side.

+1 for a class-based representation here - it’s like that for projections as they’re not really finished yet. I’d anticipate it changing eventually!