RavenDB saves property with JsonIgnore attribute

Pretty unexpected for a raven. But just reading some documents ignoring the property seems pretty straightforward. But for some reason, my property, which I do not want to keep, is preserved. I do not know why. Thanks for any help or guidance.

This property is created in an Entity project (part of a web project solution)

I have no attributes in btw class

[JsonIgnore] public bool AllowedToEdit { get { return _allowedToEdit; } set { _allowedToEdit = value; } } 

Not sure what else to publish, but this property is preserved.

+8
json c # ravendb
source share
1 answer

If you are using RavenDB 1.0, this should work as is.

If you are using RavenDB 2.0, you must definitely import from Raven.Imports.Newtonsoft.Json instead of Newtonsoft.Json

+16
source share

All Articles