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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -