2016-11-24 47 views
1

我有,我想改變ASP.NET身份用戶的密碼長度的情況下(數據庫一),以讓說4.經過大量的研究,我發現我可以從做啓動類:ASP.NET IserviceCollection AddIdentity沒有找到

public void ConfigureServices(IServiceCollection services) 
{ 
    services.AddIdentity<ApplicationUser, IdentityRole>(options => 
    { 
     options.Password.RequireDigit = false; 
     options.Password.RequiredLength = 4; 
    }) 
    .AddEntityFrameworkStores<ApplicationDbContext>() 
    .AddDefaultTokenProviders(); 
} 

我已經下載的軟件包Microsoft.Framework.DependencyInjectionMicrosoft.Extensions.DependencyInjection但仍AddIdentity無法找到

回答