.NetCore中的services.AddTransient和services.AddScoped
报:
"Unable to resolve service for type xxxx IService
while attempting to activate XXX Controller"
Startup中ConfigureServices添加:
services.AddTransient<IUserStorage, UserStorage>();
            services.AddScoped<IUserService, UserService>();
OK..
 
                    
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号