File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,24 @@ entity type to modify the default values used:
196196
197197Values passed to the factory methods override declarative attributes.
198198
199+ For the products example above, your record entity could be:
200+
201+ ``` csharp
202+ [Table (" Products" )]
203+ public record Product ([PartitionKey ] string Category , [RowKey ] string Id )
204+ {
205+ public string ? Title { get ; init ; }
206+ public double Price { get ; init ; }
207+ }
208+ ```
209+
210+ And creating the repository wouldn't require any arguments besides the storage account:
211+
212+ ``` csharp
213+ var repo = TableRepository .Create <Product >(CloudStorageAccount .DevelopmentStorageAccount );
214+ ```
215+
216+
199217### TableEntity Support
200218
201219Since these repository APIs are quite a bit more intuitive than working directly against a
You can’t perform that action at this time.
0 commit comments