2016-01-28 46 views
0

UserManager CreateAsyncy給出錯誤:UserName不能爲空或爲空。Asp.net Identity UserManager錯誤:UserName爲空

下面是我的代碼片斷:

var contractor = new Contractor() 
       { 
        UserName = contractorModel.UserName, 
        Email = contractorModel.Email, 
        EmailConfirmed = true, 
        SecurityStamp = Guid.NewGuid().ToString() 


       }; 
       var result = await UserManager.CreateAsync(contractor,"Passw0rd!"); 

回答

0

我的UserName = contractorModel.Email固定它;

相關問題