So im building a controller that uses IPersonFactory<T> to connect to PersonFactory<T> which is a base class that depending on the generic type sends the request to several different sub-factories which ultimately end in respective repositories.
Rn I'm downcasting _factories to different generic types of IPersonFactory<Person> to do the type change.
Since this gives a build error would it be better to make fields for all different types of IPersonFactory and make injections for them?