Dynamic proxy will cause only XML serialization issues and not the Json serialization problem?
I m getting the below error when i try to do load the data in XML format
System.Data.Entity.DynamicProxies.UnAuthEventStatusTyp_3A9BA375F5B9150B33712F32AE9753F5944622B315D48B2167AD5D0FF8B38B11' with data contract name 'UnAuthEventStatusTyp_3A9BA375F5B9150B33712F32AE9753F5944622B315D48B2167AD5D0FF8B38B11:http://schemas.datacontract.org/2004/07/System.Data
For testing purpose, i disabled lazy loading and then i hosted my application. There were no issues if i try to do Json serialization but if i do XML serialization, its getting failed.
Update 1:
If i dont disable Lazyloading, then i get errors related to Dynamic Proxies even for JSON Serialization. So does that mean to overcome proxy serialization in Json is it merely enough to disable LazyLoading
P.S : Using DTO and proxy disabled, i was able to get around this problem but would like to understand the reasoning behind it
Update 2:
With Lazy Loading and without Lazy loading, in both cases, entity types showing as dynamic proxy types while debugging. But Json serialization works when i disable lazy loading. Means its able to serialize dynamic proxy entities.. Am i correct?
Below is a snapshot of error message which i get if i disable Lazyloading
"Self referencing loop detected for property 'UnAuthEventStatusType' with type 'System.Data.Entity.DynamicProxies.UnAuthEventStatusTyp