I am struggling to add a few fields to the standard ApplicationUser object with the code below. I have successfully run Migrations and i can see the database scheme is updated with the new fields in the database. I followed the tutorial at http://go.microsoft.com/fwlink/?LinkID=317594
public class ApplicationUser : User
{
public string LegacyPassword { get; set; }
public DateTime DateCreated { get; set; }
public bool Activated { get; set; }
}
The problem i experience is now when i try execute registration such as :
var u = new Test.Models.ApplicationUser() { UserName = userName, DateCreated = System.DateTime.Now, PassHash = "" };
IdentityResult result = manager.Users.CreateLocalUser(u, Password.Text);
I get the following error when CreateLocalUser() executes...:
An exception of type 'System.InvalidOperationException' occurred in mscorlib.dll but was not handled in user code
Additional information: Mapping and metadata information could not be found for EntityType 'Test.Models.ApplicationUser'.
I have tried recreating the migrations about 5/6 times and started a brand new project as well but i cannot get past this error.
Any ideas?