Add Scaffold in Visual Studio 2013

Add Scaffold in Visual Studio 2013

Postby KW » Wed 06 Aug 2014 19:44

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?
KW
 
Posts: 121
Joined: Tue 19 Feb 2008 19:12

Re: Add Scaffold in Visual Studio 2013

Postby KW » Thu 07 Aug 2014 17:07

Do you have a tutorial that will work with your provider using web api 2 and odata?

http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/create-an-odata-v4-endpoint

Basically, I am trying to get the scaffolding section to work and it does not.
KW
 
Posts: 121
Joined: Tue 19 Feb 2008 19:12

Re: Add Scaffold in Visual Studio 2013

Postby MariiaI » Tue 12 Aug 2014 09:15

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.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Add Scaffold in Visual Studio 2013

Postby MariiaI » Tue 30 Sep 2014 05:48

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.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to dotConnect for MySQL