There is in issue with arrays In the JsonToDictionary method of ContextProvider.cs. They are not taken into account.
For instances, I have a property which is a list of strings, when modifying it on the client and than saving it by calling saveChanges, The associated deserialized originalValuesMap's value is null.
Here is my fix:
private Dictionary<String, Object> JsonToDictionary(dynamic json) {
if (json == null) return null;
var jprops = ((System.Collections.IEnumerable)json).Cast<JProperty>();
var dict = jprops.ToDictionary(jprop => jprop.Name, jprop => {
var val = jprop.Value as JValue;
if (val != null) {
return val.Value;
}
else if (jprop.Value as JArray != null){
return jprop.Value as JArray;
}
else{
return jprop.Value as JObject;
}
});
return dict;
}
There is in issue with arrays In the JsonToDictionary method of ContextProvider.cs. They are not taken into account.
For instances, I have a property which is a list of strings, when modifying it on the client and than saving it by calling saveChanges, The associated deserialized originalValuesMap's value is null.
Here is my fix:
Thanks