Associate DocumentDB's document id to class property -
is there way associate document's unique id property in class?
for eg:
public class product { //associate id public string productid { get; set; } public string userid { get; set; } public string productname { get; set; } }
the thing is, dont want create , maintain unique ids objects reuse id documentdb creates after writing document.
if decorate unique id using jsonproperty attributes can use fields unique id, instead of having id field on every document.
and example is;
[jsonproperty(propertyname="id")] public string productid { get; set; }
Comments
Post a Comment