Details
-
Improvement
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
(copied to CRM)
Description
We are dealing with lots of entities that create instances for contained properties/fields as part of their instantiation like this:
public List<int> Foo { get; } = new List<int>();
|
or more generic
public SomeType Bar { get; } = new SomeType();
|
The C# driver is able to serialize these properties nicely once we map them explicitly. However, they are considered readonly so deserialization gets skipped and our entities end up with not populated instances.
In order to solve this, we would suggest to enhance the driver in a way that - similar to SetIgnoreIfNull - one can select to skip the instantiation of a type and populate an existing instance on the target object.
Let me know your thoughts. I'd be happy to implement that right away if you agree.
Attachments
Issue Links
- is duplicated by
-
CSHARP-169 Deserialize Arrays to Properties without Setter
-
- Closed
-