How can I extend ApplicationUser in ASP.NET Identity but with properties that can be null? -


i extend application user. here's example:

public class applicationuser : identityuser {     public async task<claimsidentity>      generateuseridentityasync(usermanager<applicationuser> manager)     {         var useridentity = await manager.createidentityasync(this,  defaultauthenticationtypes.applicationcookie);         return useridentity;     }     public string address { get; set; }     public string city { get; set; }     public string state { get; set; } 

i tried seems when login if of these properties set null in database when /token call made returns error.

can tell me. need make change way these properties set here or in place?

if understand question correctly, simple solution problem create nullable type. can please share do? create custom identity provider, example?


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

Fatal error: Call to undefined function menu_execute_active_handler() in drupal 7.9 -

python - RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK -