none
.NET dataset to Azure Blob RRS feed

  • Question

  • I have an old program that I need to convert to store data on Azure Blob Storage.  Right now it uses a dataset and stores it locally as an XML file.  I won't be using this program for too much longer so don't want to put too much time into converting it to use a database.  What is the easiest way to persist the data into an Azure Blob?  Should I save it into an XML file locally and then upload that file to the datastore?  Or is there a more direct method?
    Sunday, May 13, 2018 3:04 AM

All replies

  • You don't need to save the file locally. You can read and write the XML directly to a BLOB.

    Te DataSet.WriteXml method can write to a Stream. And the Stream can be a MemoryStream, so you can have in-memory the XML that represents your dataset. The API that writes the BLOB, both if you are using directly the REST API or if you are using the NuGet libabries will take the content from memory. And the reverse process works in the same way for reading. So you don't need to go through a file on disk.

    Sunday, May 13, 2018 11:01 AM
  • https://social.msdn.microsoft.com/forums/azure/en-US/home?category=windowsazureplatform

    You could ask questions in the Azure development forum.

    Sunday, May 13, 2018 5:21 PM