New answers tagged

1

Design As you noticed, a service locator is a problematic solution for your IFamilyGraph dependency problem in BaseRelationships. There's a much simpler solution: make these methods extensions for IFamilyGraph. It's IFamilyGraph that lets you obtain relationships for a person, so that is the API that you're extending. Alternately, you could pass ...


0

Design Your API allows consumers to navigate people by their relationships to other people. For this reason, it surprises me you define a person as a simple DTO. By making this decision, you require static classes to store the relationships and fishy extension methods to get the relationships. public static IEnumerable<Person> Children(this Person ...


Top 50 recent answers are included