WebApi controller path

6 posts, 0 answers
  1. Saeid
    Saeid avatar
    7 posts
    Member since:
    Jan 2012

    Posted 04 Mar 2015 Link to this post

    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?
  2. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 06 Mar 2015 Link to this post

    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.
     
  3. DevCraft banner
  4. Saeid
    Saeid avatar
    7 posts
    Member since:
    Jan 2012

    Posted 07 Mar 2015 in reply to Viktor Zhivkov Link to this post

    Is it possible to change t4 template in "\Data Access\dsl2013\Extensibility\Dsw\Templates\CSharp\" to correct path?
  5. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 11 Mar 2015 Link to this post

    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.
     
  6. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 10 May 2015 in reply to Viktor Zhivkov Link to this post

    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

  7. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 13 May 2015 Link to this post

    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.
     
Back to Top
DevCraft banner