Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
0
How to call Web API or controller or c# code to save data to database
posted

I am using Blazor server, and as Michael DiFilippo suggested, i am using CommitEditsAsync method to save data. But this method save/accept data in grid. 

How we can call web API or controller or c# code to save data in database. I am using EditModeType.CellBatch, and on SAVE button, like to start a db transaction and save all changes. So that either all save or nothing save. 

I was OnDataCommitting method is invoked when we call CommitEditsAsync. But this method give one row at a time. Therefore cannot control transaction.

Is there any way, when click SAVE button, then all changes pass to web api/controller or c# code, so that we can start database transaction and save changes. Appreciate if there is a sample project.