I apologize I'm late to the discussion,
I was able to get the scaffolding working, of course with extra effort. I didn't have to change my scaffolding template even though I started down that path based on Google searches and given direction. Here are steps I took to get it working.
Hope this help.
I was able to get the scaffolding working, of course with extra effort. I didn't have to change my scaffolding template even though I started down that path based on Google searches and given direction. Here are steps I took to get it working.
- Commented out any modelBuilder.Configurations.Add in the OnModelCreating in the context class with composite keys.
- Added the connection strings to the app.config for my entity and mapping class projects
- Added the [key] attributes to all entities except composite keys (ok this was weird but the scaffolding kept prompting an error that a key was needed even though the mapping had it)
- Another weird item, any entities that have composite keys (AspNetUserLogins, AspNetUserRoles) that are referenced will need to be commented out also (entity and mapping classes).
-
Optional: Until you generate the scaffolding you may need to comment out composite key classes and project file entries.
Hope this help.