static void Register(IServiceCollection services) { // Register application-specific services in the dependency injection framework //ServiceBootstrapper.Bootstrap(new ServiceRegistrar(services)); services.AddScoped <IAService, AService>(); DataBootstrapper.Bootstrap(services); }
public static void Register(IContainer container) { //Services are currently auto registered in assembly scan //However, I don't want API knowing of the data layer DataBootstrapper.Register(container); }
private static void WireupdDependency() { ContainerManager.Initialize(); CommonBootstrapper.Initialize(ContainerManager.Container); DataBootstrapper.Initialize(ContainerManager.Container); APIBootstrapper.Initialize(ContainerManager.Container); }
private void WireupDependency() { // Wire up dependencies of core classes ContainerManager.Initialize(); DataBootstrapper.Initialize(ContainerManager.Container); FormsBootstrapper.Initialize(ContainerManager.Container); AndroidBootstrapper.Initialize(ContainerManager.Container); }
public static IServiceCollection RegisterServices(this IServiceCollection services) { DataBootstrapper.RegisterRepositories(services); var mappingConfig = new MapperConfiguration(mc => { mc.AddProfile(new MappingProfile()); }); IMapper mapper = mappingConfig.CreateMapper(); services.AddSingleton(mapper); services.AddScoped <IPostsService, PostsService>(); services.AddScoped <IUsersService, UsersService>(); return(services); }