From the course: Building a Web Application on Microsoft Azure
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Implementing the StorageService class - Azure Tutorial
From the course: Building a Web Application on Microsoft Azure
Implementing the StorageService class
- [Instructor] We're going to implement a new storage service class that encapsulates the logic for communicating to the Azure storage account. In the .NET world, we use NuGet packages for reusing code. So in this project I'm going to add a new NuGet package reference that is Azure Storage Blobs. It was created by Microsoft and it contains all the required libraries for using storage accounts in your .NET code. So let's install this. And now we're ready to add a new folder and let's name it Services. And here, I'm going to add a new class that is storage service, and I want to expose the following method. I want to return the final URL of the file that we're uploading. So public, we're going to return this asynchronously. And let's name this UploadAsync. And this is going to receive a stream and the fileName. So the first thing that I want to do is position this stream at zero. And then I'm going to create a new…
Contents
-
-
-
-
-
-
(Locked)
Using Azure Storage for storing binary files39s
-
(Locked)
Creating the Storage account using the Azure portal1m 50s
-
(Locked)
Creating the Blob container in the Storage account1m 59s
-
(Locked)
Modifying the seed data to read the photos from the container4m 7s
-
(Locked)
Modifying the user interface to upload photos2m 44s
-
(Locked)
Implementing the StorageService class4m 5s
-
(Locked)
Invoking the StorageService from the Edit page1m 38s
-
(Locked)
Testing the web application locally2m 27s
-
(Locked)
Publishing the application to the deployment slot5m 4s
-
(Locked)
Swapping the production and dev deployment slots2m 14s
-
(Locked)
-
-
-