[Solved] insert xml data into sql server c# twilio [closed]


So here’s my two cents:

  1. Get a clear idea of the flow of information. (e.g. if you’re pulling information from somewhere via RESTful web services, you’ll likely need to get the client API documentation and build your API calls around the existing methods. If the client (Twilio) is pushing information to you, then it will need to know how to call your web service/s).

  2. Once you know how you are getting the XML, I would recommend building at least one layer of abstraction like a Data Access layer which has your actual method that executes a stored procedure with the XML as an input parameter. For instance, you could create a method:

    GetTwilioResponse(customTypeToHoldTwilioAPIparams params)
    {
        Here would be your code for calling the Twilio API.  
        Somewhere in here, if the response from Twilio is good, then call a method in another class that will call the stored procedure;
    }
    
  3. After you figure out how the SP is going to be executed, you can write your stored procedure to iterate over the XML and put it into the database.

  4. If you’re pulling from the client, you’ll need to implement some sort of scheduling mechanism too.

This is just one opinion on how to proceed. This is just how I would approach the task if it were me 🙂

Edit: Looking at the twilio documentation, it looks like you’ll be pulling from Twilio via the Twilio REST API. In this case, you’ll probably need to first figure out your mechanism for calling it on a pre-determined basis, then worry about the implementation in code.

solved insert xml data into sql server c# twilio [closed]