This is a migrated thread and some comments may be shown as answers.

WebApi controller path

5 Answers 56 Views
Web Services
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Saeid
Top achievements
Rank 1
Saeid asked on 04 Mar 2015, 10:53 AM
Hi

I create a model and want create Web Api with "Add telerik data access service" all controllers create under project folder but I want create controllers under "controller" folder.

How can I do it?

5 Answers, 1 is accepted

Sort by
0
Viktor Zhivkov
Telerik team
answered on 06 Mar 2015, 04:51 PM
Hi Saeid,

I am sorry, but currently there is no way to pick a specific folder for controllers to be generated in.
I am afraid that you will have to drag/drop the generated files in the right places after you have run the wizard. Be advised that if you run again the generation there will be another set of controllers put in the root folder that might cause build issues until you merge or delete the previous file.

Regards,
Viktor Zhivkov
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
Saeid
Top achievements
Rank 1
answered on 08 Mar 2015, 05:58 AM
Is it possible to change t4 template in "\Data Access\dsl2013\Extensibility\Dsw\Templates\CSharp\" to correct path?
0
Viktor Zhivkov
Telerik team
answered on 11 Mar 2015, 12:21 PM
Hi Saeid,

It is not possible to change the output folder using the T4 templates. There is some code in our assemblies that controls that and allows pre-processing the templates before running the code generation.
You may consider as option to define local T4 templates that are independent of the Add Service wizard, but reuse most of the code of the original ones. Then you can facilitate the build-in T4 code generation support of Visual Studio and skip the wizard. If you decide to go that way and need assistance, feel free to contact us with your questions.

Regards,
Viktor Zhivkov
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
Jon
Top achievements
Rank 1
answered on 10 May 2015, 10:59 AM

Hi Viktor

 I'm just starting to look at the possibility of using Telerik Data Access Web APIs and have come across the same issue as Saeid.  It seems like a somewhat bad move to not at least have the option of putting these in some sub folder - after all you can put the models into namespace folders.  

It also seems somewhat counter to the conventions of MVC etc to put them in the root.

To that end please could an option be added to the wizard for the next release so that there is the ability to optionally put the files into a single folder - as well as the option to do a nested folder based on schema names.  

Regards

Jon

0
Viktor Zhivkov
Telerik team
answered on 13 May 2015, 09:10 PM
Hi Jon,

Thank you for your feedback.
As we are shifting our focus on the Telerik Data Access Runtime I am unable to give you any details about when and how we will be able to adjust the behavior of the wizard.
Feel free to contact us if you need assistance with getting started with Telerik Data Access or our integration with Web API.

Regards,
Viktor Zhivkov
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
Web Services
Asked by
Saeid
Top achievements
Rank 1
Answers by
Viktor Zhivkov
Telerik team
Saeid
Top achievements
Rank 1
Jon
Top achievements
Rank 1
Share this question
or