Page 1 of 1
Add Scaffold in Visual Studio 2013
Posted: Wed 06 Aug 2014 19:44
by KW
I am trying to add Scaffolding in visual studio 2013 for a web api 2 project.
-Add controller
-Add web api 2 odata controller with actions, using entity framework
Receiving the error:
"error
There was an error running the selected code generator. 'object reference not set to an instance of an object.
I'm not sure if this is a problem with dotconnect or something else. Do you know if this scaffold should work with your tooling?
Re: Add Scaffold in Visual Studio 2013
Posted: Thu 07 Aug 2014 17:07
by KW
Do you have a tutorial that will work with your provider using web api 2 and odata?
http://www.asp.net/web-api/overview/oda ... 4-endpoint
Basically, I am trying to get the scaffolding section to work and it does not.
Re: Add Scaffold in Visual Studio 2013
Posted: Tue 12 Aug 2014 09:15
by MariiaI
Sorry for the delay. We have reproduced this issue. We will investigate it in more details and inform you about the results as soon as any are available.
Re: Add Scaffold in Visual Studio 2013
Posted: Tue 30 Sep 2014 05:48
by MariiaI
We have investigated the issue more clearly. To use this functionality completely it is necessary to:
- use the DbContext template (not EntityObject); if the "Repository And Unit of Work" template is also used, the UseDbContext option of this template should be set to True;
- set the "File Per Class" option of the DbContext template to True, otherwise Visual Studio doesn't detect the necessary classes correctly.
We have changed the behaviour: now the default value for the 'File Per Class' option of the DbContext template is True. The changes are available in the latest build of Entity Developer 5.7.451:
http://forums.devart.com/viewtopic.php?f=32&t=30472
If you have any further questions, feel free to contact us.