public static void AddScope(IServiceProvider services) { services.AddScoped <IApplicationContext, ApplicationContext>(); services.AddScoped <IUserMap, UserMap>(); services.AddScoped <IUserService, UserService>(); services.AddScoped <IUserRepository, UserRepository>(); }