1. Olivier PAVLIN
  2. SnapObjects
  3. Wednesday, 20 November 2019 14:05 PM UTC

Hello,

I assume the file "SampleService.cs" located in "\Programmes\Appeon\SnapDevelop 2019\Tools\Common7\IDE\ScaffoldedItem\Service (DataStore)\Services\Impl"

is used during the scaffolding of a datastore model class to auto-generate Service and Controller (screenshot01). I would like to modify a bit the template to change the routing argument (remove the /[action])(screenshot02).

But if i modify and save this "SampleService.cs" it does not have any effect on the code generated by the scaffolding and i still get the /[action] routing argument (screenshot03).

How can i make my custom template works ?

Regards,

Attachments (3)
Accepted Answer
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 20 November 2019 23:05 PM UTC
  2. SnapObjects
  3. # Permalink

The sample controller is just a demo Web API and not what you edit for scaffolding.  You need to edit the actual templates used by the scaffolding engine, but in the beta you cannot edit them.  You need to wait for the official release of PowerBuilder 2019 R2 if you want to customize the scaffolding generated code.

Comment
  1. Logan Liu @Appeon
  2. Thursday, 21 November 2019 01:32 AM UTC
Hi Olivier,

I want to add a few details.

1) The template is located in "SnapDevelop 2019 R2\modules\SnapDevelop.Scaffolding\Templates".

2) It is really difficult to modify it without any official documents. But as Armeen said, you need to wait for the official release of PowerBuilder 2019 R2.

3) However, if you only want to modify some tiny details, such as copying a method in the template to add more methods, you can try it yourself.

Regards,Logan
  1. Helpful
  1. Olivier PAVLIN
  2. Thursday, 21 November 2019 10:04 AM UTC
Perfect thank you that's what i was looking for.
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.