I\'m having a hard time figuring out how to implement a factory pattern in a DTO mapper I\'m trying to create. I\'m pretty sure I need to rethink my design. Here is a very s
There is no easy way around this.
In order to use the PilotNumber property you need the Pilot type. Using a Factory pattern means you are giving up the different sub-types of Person.
If it's any consolation, the BCL has similar patterns,
var req = WebRequest.CreateRequest("http://someUrl");
((HttpWebRequest)req).Contentlenght = ...;