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

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -