Skip to content

TimGibbs/AzureTableStorageRepository

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AzureTableStorageRepository

Generic repositiory for storing items in Azure table storage. Stored items need to implement ITableEntity

Implementation

    builder.Services
      .AddTransient(o => 
        CloudStorageAccount.Parse(o.GetService<IConfiguration>()["AzureWebJobsStorage"]).CreateCloudTableClient());
    builder.Services
      .AddTransient(typeof(ITableStorageRepository<>), typeof(TableStorageRepository<>));

Items will be stored and retrieved from a table named after the class unless overwritten.

    var result = await _tableStorageRepository
                .OverrideTableName(item)
                .GetByIdAsync(id);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages