// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { StartupIoC.ConfigureServices(services, Configuration); services.AddMvc(config => { config.Filters.Add(typeof(CustomExceptionFilter)); }); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvc(); AutoMapperConfig.RegisterMappings(); StartupIoC.RegisterIoC(services, Configuration); }
private void RegisterServices(IServiceCollection services) { services.AddScoped <IInsertPerson, InsertPerson>(); services.AddScoped <IListPersonService, ListPersonService>(); services.AddScoped <IEditPersonService, EditPersonService>(); services.AddScoped <IDeletePersonService, DeletePersonService>(); StartupIoC.RegisterServices(services); }
private static void InitializeContainer(Container container) { StartupIoC.RegisterIoC(container); // Identity container.Register <ApplicationDbContext>(Lifestyle.Scoped); container.Register <IUserStore <ApplicationUser> >(() => new UserStore <ApplicationUser>(new ApplicationDbContext()), Lifestyle.Scoped); container.Register <ApplicationUserManager>(Lifestyle.Scoped); container.Register <ApplicationSignInManager>(Lifestyle.Scoped); }
private static void InitializeContainer(Container container) { StartupIoC.RegisterIoC(container); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { StartupIoC.RegisterServices(services); services.AddControllers(); }
public void ConfigureServices(IServiceCollection services) { StartupIoC.Register(services); }