2016-11-24 19 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无法找到

回答