private void RegisterServices(IServiceCollection services) { services.AddScoped <IInsertPerson, InsertPerson>(); services.AddScoped <IListPersonService, ListPersonService>(); services.AddScoped <IEditPersonService, EditPersonService>(); services.AddScoped <IDeletePersonService, DeletePersonService>(); StartupIoC.RegisterServices(services); }
// 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(); }