Say I have a class of User and that user has an Id & Name, in request response modeling, I would make a request with Name on it and a response with Id and Name, thereby my domain model would be
public User
{
public int Id { get; set; }
public string Name {get; set; }
}
In SOA (web api) this is ever so slightly wasteful as you're making a request with an always NULL id. Now let's scale to something complex that I won't go into detail on and say User now has 20 properties, 5 of them complex objects, so your http request is going to increase. To make it more fun let's say some of those properties cannot be exposed to the UI (ex. hash & salt).
What is the recommended approach for handling this common scenario in SOA architecture using domain driven design?
Edit: My question deals more with request/response than converting domain to dto, I think the takeaway is request = dto & response = dto.