I am currently requesting Entity using predictions to avoid returning the entire object. It works flawlessly, however, looking at the actual response of the server, I see the same type of definition, repeated for each individual element.
For instance:
["$type":"_IB_4NdB_p8LiaC3WlWHHQ_pZzrAC_plF4[[System.Int32, mscorlib],[System.String, mscorlib],[System.String, mscorlib],[System.String, mscorlib],[System.Nullable`1[[System.Int32, mscorlib]], mscorlib],[System.Int32, mscorlib],[System.Single, mscorlib]], _IB_4NdB_p8LiaC3WlWHHQ_pZzrAC_plF4_IdeaBlade"
Now, given that each element as a result uses the same projection for this query, is there a way for Breeze to define only the Description ONCE type instead of each element?
This may not seem like a big problem, but since the size of the result increases these bytes, they begin to add up. At the moment, there is a slight difference between the return of the predicted values and the whole entity due to these overheads.
NOTE. . As it turned out, since we use dynamic JSON compression in our real-world environments, this actually turns out to be a secondary problem, since 200 KB responses actually turn into less than 20 KB of traffic after gzip compression. This will probably be the closure of this issue if someone has something to add that could be useful to others.
September 18, 2014 Patch
I decided to "cure" the problem of a long ugly name like $ in serialized data both for dynamic types from projection queries and for anonymous types created for the endpoint, such as "Lookups".
Breeze Labs nuget, "Breeze.DynamicTypeRenaming" ( " Breeze" ). "" -API . - CustomBreezeConfig, Breeze Json.Net "Binder" DynamicTypeRenamingSerializationBinder; .
nuget -API, " ". $type "_IB_4NdB_p8LiaC3WlWHHQ_pZzrAC_plF4, Dynamic".
. "DocCode".
, Breeze Lab, Core Breeze. " " . , . . , , .