How Does Database Get Updated

How Does Database Get Updated

marlodanmarlodan Posts: 5Questions: 1Answers: 0

I'm using Visual Studio 2017 Editor_Net_Core_Demo and I'm looking at the bubble editor Example. When I look at the simple.html, the route for the editor is api/Staff, as it the route for a lot of the demos. I'm not that familiar with ADO.Net, but I can see that the controller is just grabbing the data from the database and sending back a Json response. I have a question about this.
1. When I edit using the bubble editor, it calls the same url in the same controller, which takes no parameters. So the question is, how does the database get updated? I would have expected the editor to use a different url than the table and for that url to take a parameter with the edited data and then do a database update.

Answers

  • rf1234rf1234 Posts: 2,805Questions: 85Answers: 406

    "So the question is, how does the database get updated? I would have expected the editor to use a different url than the table and for that url to take a parameter with the edited data and then do a database update."

    You don't need different urls for that. The database gets updated because Editor generates all of the required SQL-Statements and executes them. If you buy an Editor license you can analyze the source code and find out how exactly this is being accomplished ... I prefer not to know all of the detail but having a great software doing that job for me!

  • kthorngrenkthorngren Posts: 20,267Questions: 26Answers: 4,764

    Maybe you are looking for something more like this where you can define different URLs for CRUD operations:
    https://editor.datatables.net/examples/advanced/REST.html

    When looking at the Editor examples you can also see the data exchange by clicking the Ajax Data tab. Make some live changes to the data and see what happens.

    Kevin

  • marlodanmarlodan Posts: 5Questions: 1Answers: 0

    rf1234, I get what you are saying but my requirements are a bit too complicated. I need to massage the data quite a bit before updating. That said, there is not a different url for the first load, update, delete or create. It uses the same one for all. What I have discovered is that the data posted back can be found in the Header. If you are using ASP,NET Core you can access the header information within the controller method using Request.Body. All I need to do now is understand the format of the data.

  • marlodanmarlodan Posts: 5Questions: 1Answers: 0

    kthorngren, I have to check that out but at first glance it looks like it might be what I am looking for. I will get reply back when I have taken a closer look.

This discussion has been closed.