Unable to track an entity of type because primary key property code example
Example: Unable to track an entity of type 'ApplicationRole' because primary key property 'Id' is null
// assign GUID to Id
user.Id = Guid.NewGuid().ToString();
var result = await _userManager.CreateAsync(user, password);