Let us say that I have the following structure:
public class Parent
{
public string Id;
}
public class FirstChild:Parent
{
public string FirstName;
}
public class SecondChild:Parent
{
public string LastName;
}
And I have two services contacting via Request/Response messaging method.
My First service sends a message and expects either FirstChild or SecondChild as a response, so what I did is:
var client = bus.CreateRequestClient<CommandType, Parent>(serviceAddress, TimeSpan.FromSeconds(50));
var response = await client.Request(command);
The issue is that response is sent from second service containing Id and FirstName/LastName but received by first service containing only Id.
How can I override this issue?