Hello @Ranjitha TS ,
welcome to this moderated Azure community forum.
If you check the documentation, the use of the Azure IoT Dev Tool (also available as extension) is advertised.
Personally I'm not fond of this approach, here are my 50 cents.
Usually, I put the custom logic as a singleton class inside the template and use methods and events to connect the ModuleClient logic to that singleton.
This way, I have create two separate parts with minimal interaction:
- A class with all the custom logic which is manipulated by methods and emits events
- The ModuleClient template which just passes on message to and from the singleton.
This way, the singleton class is unit-testable or can even be put in a console app if needed.
Standard developers can work on it.
If something goes wrong, it's easy to identify if the fix is needed in the single ton or the moduleclient 'wrapper'.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.