/// <summary> /// Register All Business Services for DI /// </summary> /// <param name="services"></param> private static void RegisterBusinessServices(IServiceCollection services) { services.AddScoped <IGuestInfoService, GuestInfoService>((ctx) => { IGuestInfoFactory factory = ctx.GetService <IGuestInfoFactory>(); return(new GuestInfoService(factory)); }); services.AddScoped <IGuestInfoServiceTypeService, GuestInfoServiceTypeService>((ctx) => { IGuestInfoServiceTypeFactory factory = ctx.GetService <IGuestInfoServiceTypeFactory>(); return(new GuestInfoServiceTypeService(factory)); }); services.AddScoped <IEventService, EventService>((ctx) => { IEventFactory factory = ctx.GetService <IEventFactory>(); return(new EventService(factory)); }); services.AddScoped <IServiceTypeService, ServiceTypeService>((ctx) => { IServiceTypeFactory factory = ctx.GetService <IServiceTypeFactory>(); return(new ServiceTypeService(factory)); }); }
public ServiceTypeService(IServiceTypeFactory _serviceTypeFactory) { serviceTypeFactory = _serviceTypeFactory; }