I had the same issue today.
I had added some custom configuration for one of my Model classes to add a relationship using the fluent API. This was specified in my dbContext
class in the OnModelCreating
override using the following:
modelBuilder.Configurations.Add(new OrderConfiguration());
Commenting out the above line allowed the Controller
scaffolding to run as expected.
VS 2013 update 2 had a problem with this and the scaffolding came up with an unhelpful error with no further information. In installed Update 3 and it gave just enough detail to track down the underlying issue.
Jeff.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…