public CompatibleComponents(Car car, Type componentType) { this.car = car; Type RepositoryType = Type.GetType(componentType.Name + "Repository"); IComponentRepository Repository = (IComponentRepository)Activator.CreateInstance(RepositoryType); Options = Repository.GetAllCompatibleComponents(car.Trim); }