public TestService(ITestDomain testDomain) { this._testDomain = testDomain; }
public SampleController(IServiceProvider serviceProvider) { testDomain = serviceProvider.GetRequiredService <ITestDomain>(); }
public SampleController(IFactory factory) { testDomain = factory.GetDomain <TestDomain>(); }