umm / cafu_kvs

:green_book: Simple file based key value store system
MIT License
0 stars 0 forks source link

Create instance if value does not exists #11

Closed monry closed 6 years ago

monry commented 6 years ago

What

// Retrieve
KeyValueRepository.Load();
return KeyValueRepository.GetEntity<SomeEntity>(key, create: true).Foo;

// Capture
KeyValueRepository.GetEntity<SomeEntity>(key, create: true).Foo = "value";
KeyValueRepository.Save();