Visual Studio 2013 WEB API template scaffolding fails when creating basic model and applying scaffold

StackOverflow https://stackoverflow.com/questions/18243437

Frage

Start up VS2013 Create basic WEB API project with defaults Create basic model (ex. Person class with PersonId and PersonName properties) Compile Create Scaffold (pick WEB API with entities)

When I go to create the scaffold using all the defaults I get the error

Add Controller

Scaffolding Failed: WebApplication1.Models.WebApplication1Context is not a System.Data.Entity.DbContext class and does not contain a People property, so it cannot be used as the database context.

ANY IDEAS??

War es hilfreich?

Lösung

Seems like you are using the Preview build which doesn't support this scenario. Can you please install Preview Refresh and confirm if this fixes your issue?

You can install Preview Refresh from: http://www.microsoft.com/en-us/download/details.aspx?id=39365

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top