Like several other people, I\'m having problems serializing Entity Framework objects, so that I can send the data over AJAX in a JSON format.
I\'ve got the following
I have just successfully tested this code.
It may be that in your case your Message object is in a different assembly? The overriden Property SupportedTypes
is returning everything ONLY in its own Assembly so when serialize is called the JavaScriptSerializer
defaults to the standard JavaScriptConverter
.
You should be able to verify this debugging.