Allow default C# driver serializers for mapping of structs with simple types

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • None
    • None
    • Dotnet Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      We allow mapping dictionaries of simple structs using the default C# serializer. This issue is about doing the same when the struct is used as a simple property. For example:

      ```
      class CustomStructEntity : IdEntity

      {   public MonetaryAmount money \{ get; set; }

      }

      record struct MonetaryAmount

      {   public string Currency \{ get; set; }

        public decimal Amount { get; set; }
      }
      ```

      Initial place to look: `BsonSerializerFactory.CreateTypeSerializer`

       

            Assignee:
            Arthur Vickers
            Reporter:
            Arthur Vickers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: