// snippet: ctor public FakeCustomerService(CustomerFaker customerFaker, IOptions <CustomerServiceOptions> options) { this.customerFaker = customerFaker; customers = customerFaker.Generate(options.Value.Count); }
// add package Microsoft.Extensions.Options //public FakeCustomersService(CustomerFaker customerFaker, IOptions<CustomerOptions> options) //{ // this.customerFaker = customerFaker; // customers = customerFaker.Generate(options.Value.Qty); //} public FakeCustomersService(CustomerFaker customerFaker, CustomerOptions options) { this.customerFaker = customerFaker; customers = customerFaker.Generate(options.Qty); }