Skip to content

Commit 67478eb

Browse files
authored
Update README.md
1 parent d610c7d commit 67478eb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,22 @@ public class VArrayModel
127127
}
128128
```
129129

130+
## Virtual Dictionary Attributes
131+
When storing dictionaries in Azure Table store there are two options. The first option is to store it as a JSON payload and the second option is to expand the dictionary with his items to separate properties in Azure Table Store with the following code:
132+
133+
```csharp
134+
[Storable(Tablename: "VDictionaryModels")]
135+
public class VDictionaryModel
136+
{
137+
[PartitionKey]
138+
[RowKey]
139+
public string UUID { get; set; }
140+
141+
[VirtualDictionary(PropertyPrefix: "DE")]
142+
public Dictionary<string, int> DataElements { get; set; } = new Dictionary<string, int>();
143+
}
144+
```
145+
130146
## Store as JSON Object Attribute
131147
The store as JSON attribute allows to store refenrenced objects as json payload for a specific property
132148

0 commit comments

Comments
 (0)