Hi all,
I have the following issue:
I want to insert data (from REST API) for one of my dynamic modules (I have created the model as fields and so on). Do I have to create a custom provider and with fluent api insert the data, what is the name of the provider which I have to override and what is the best practice for my issue as an idea?
Thank you in advance :)
If you are using Sitefinity version 10.x or greater you do not need to override anything as the Web Services out of the box are fully CRUD enabled, Under Admin > Web Services there are fully examples under the "Use in my app" link. Here is an example using a customer module "Press Releases".
github.com/.../SitefinitySamples.PressReleaseWebService
If you need to insert content via the C# API there are fully code examples created right in the CMS for custom content.
Navigate to Admin > Module Builder
From there select the module you want
On the specific module page you will see at the bottom "Code Reference for {NAMEOFMODULE}"
Hi,
Thank you a lot for the answer.
How can I invoke the controller which has the logic for insert data?
Do you mean that I don't have to use providers for my case, because I am searching for providers (for getting data from outside source/site)?
Thank you again :)
My idea in steps:
1) Create a module
2) Create a controller or helper class with logic for getting the data an inserting in that module
3) In global.asax will invoke that controller/class every time when the app starts
Is there a better idea?
Thanks people :)
you can directly use the sitefinity api for frontend
Post : localhost/.../your_module_name
Take refrence of news module api.tin.info/.../newsitem