Class BlobPathResolver
- Namespace
- CloudStorageORM.Infrastructure
- Assembly
- CloudStorageORM.dll
public class BlobPathResolver : IBlobPathResolver
- Inheritance
-
BlobPathResolver
- Implements
- Inherited Members
Constructors
BlobPathResolver(IStorageProvider)
public BlobPathResolver(IStorageProvider storageProvider)
Parameters
storageProviderIStorageProvider
Methods
GetBlobName(Type)
Builds the deterministic blob folder name for the specified entity type.
public string GetBlobName(Type type)
Parameters
typeTypeEntity CLR type used to derive the blob folder.
Returns
- string
The provider-safe blob folder name for the entity type.
Examples
var folder = resolver.GetBlobName(typeof(User));
// Example output: "a1b2c3d4e5f6g7h8-user"
GetPath(IUpdateEntry)
Builds the full blob path from an EF update entry.
public string GetPath(IUpdateEntry entry)
Parameters
entryIUpdateEntryChange-tracked EF entry that contains entity metadata and key values.
Returns
- string
The full blob path for the tracked entity.
Examples
var path = resolver.GetPath(updateEntry);
GetPath(Type, object)
Builds the full blob path for an entity type and primary key value.
public string GetPath(Type type, object keyValue)
Parameters
typeTypeEntity CLR type that owns the blob.
keyValueobjectPrimary key value used to identify the entity blob.
Returns
- string
The full blob path including folder and json file name.
Examples
var path = resolver.GetPath(typeof(User), "42");
// Example output: "a1b2c3d4e5f6g7h8-user/42.json"