Customizing the Code
From Znode Knowledge Base
The libraries folder consist of:
- Znode.Custom.Api.Model - Consist of custom Api Models and its responses.
- Znode.Custom.Data - Consist of custom entities.
- Znode.Libraries.Report - Consist of report structure.
- Znode.Libraries.Resource - Consist of resource files.
"Znode.Engine.Admin" contains all the of the same modules as the Webstore.
- Custom Auto Mappers
Creating Custom Code
Suppose we want to customize the portal controller.
- Create a "CustomPortalController" and add all the required customized methods.
- Although Portal list has the URL Store/List, but when you create a custom controller the URL will be "CustomPortal/List".
- In order to avoid this difference, we used Attribute Based Routing by writing a Route Attribute above the action method as [Route("Store/List")] which will then point to the list of Stores.
- Create a "CustomPortalAgent" so that it will inherit the previous "StoreAgent" and interface.
- Then, create the completet he API flow. Code is now customized.