Skip to content

JustBasics96/PersistentKeyValueStorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PersistentKeyValueStorage

This is a Libary to manage Key Value Storages and store them in a database.

Supported Storages

  • In Memory | NonPersistent
  • Azure Mongo DB / CosmosDB

How to Use

Configuration Mongo

{
  "Connections":{
    "PersistentKeyValueStorage":{
      "ConnectionString":"",
      "Database":"dbName"
      }
   }
}

Net 5 DI

  services.AddSingleton<IPersistentKeyValueStorage, Mongo>();

Methods

    Task CreateOrUpdateAsync(Model.Entry entry);
    Task<string> GetValueAsync(string keyName);
    Task<bool> DeleteAsync(string keyName); 

CreateOrUpdateAsync

Creates or updates an Entry object. No return value

GetValueAsync

Returns the latest value for the specified key. Not found returns String.Empty

DeleteAsync

Returns true when delete successfull, otherwise it will return false

History

02-22-2021 Birthday

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages