You have the wrong item tagged as the foreign key.
public class AppUser : IdentityUser
{
public async Task<claimsidentity> GenerateUserIdentityAsync(UserManager<appuser> manager)
{
var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
return userIdentity;
}
[ForeignKey("Domain")]
public int? DomainId { get; set; }
public virtual Domain Domain { get; set; }
}
</appuser></claimsidentity>