2

New to Raven. I have an MVC page that saves data to a Raven document. I am able to save all fields as expected. I have noticed the Id (field/attribute of the table/class structure in my project) is null and it does not get saved into the document. There is a Raven system generated Id in the title of the document (like DocName/123 etc...). How can I get that DocName/123 or 123 or some other auto generated Id field save into the raven document? Please help..Thank you

ZVenue
  • 4,967
  • 16
  • 61
  • 92

1 Answers1

2

Raven will Automatically generate the Id if it is not specified. If you don't want Raven to generate this key then you need to specify public string Id {get; set;} property in your class.`

Jethro
  • 5,896
  • 3
  • 23
  • 24