NullReferenceException when saving an ExpandoObject property

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.13.0
    • Affects Version/s: 2.1.1
    • Component/s: Serialization
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      I have a class like:

      	public class TagRecord
      	{
      		public Guid Id { get; set; }
      		....
      		public ExpandoObject ExtraData { get; set; }
      	}
      

      When I trying to insert it in MongoDb without setting ExtraData property (so leaving it to null) I get a NullReferenceException exception.
      If I simply change the type to "Object" all is working fine, also when I actually save it with an ExpandoObject instance.

            Assignee:
            James Kovacs
            Reporter:
            Davide Icardi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: