1
Vote

database creation bugs

description

I used nuget to get the code on 3/27/2013. The code does not create the database as it was intended. I narrowed it down to "UsersContext : DbContext ...." where only "DbSet<UserProfile> ..." is used versus "DataContext : DbContext" where " public DbSet<User> Users { get; set; } public DbSet<Role> Roles { get; set; } ...." are used. I don't think "UsersContext ..." is needed at all.

I think there were two branches of code that unintentionally got merged producing the errors in the code. If one were to remove "UserContext" and "UserProfile" and use "DbContext" throughout the code, it fixes this problem.

The reason the code as is works with a user/password "demo/123456" is that these are cached (but not saved in the database). Secondly, codefirst was set to drop/create database on each invocation.

Thanks

comments