Learn how to write C# to create a lease that controls parallel access to a blob and thus takes an approach of pessimistic concurrency.
- [Instructor] For pessimistic concurrency,…we can explicitly ask for a lock…or what's called a lease on a blob.…So let's use an AppendBlob model,…and I'll add a new file here by copying…and pasting the AppendBlob test from before.…Change the name,…open the file,…change the name of the class.…
And so here, we have the same as before,…a client being generated.…It's a blob client.…And I'm going to use an AppendBlob example,…but it also applies to bloc laws.…In this case, we want to take a blob…and get an infinite lease.…So, we'll ask for a lease.…We'll acquire a lock on the blob…without actually worrying about timeouts…or any constraints like that.…We'll get ourselves a container reference,…append-blob-container will do.…
We'll get ourselves a blob,…this time with a lease, slightly different blob,…and CreateOrReplace.…Now, different from before, to make it…a little bit more convenient to set break points…for your testing here,…we'll say we'll check if it exists.…And we'll await.…
So, you can set a break point if you want to check,…
- Azure Storage overview
- Azure Storage security
- Deploying Azure Storage
- Accessing Azure Storage files
- Passing messages with Azure Storage queues
- Storing unstructured data with Azure Storage blobs
- Storing structured data in Azure Storage tables (Cosmos DB)
Skill Level Intermediate
Microsoft Azure Logic Apps First Lookwith Anton Delsink1h 9m Intermediate
4. Azure Storage Files
5. Azure Storage Queues
6. Azure Storage Blobs
7. Azure Storage Tables
Next steps1m 19s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.