Sitecore / autohaus

An open source demo site for Sitecore 7
47 stars 18 forks source link

Using OData with SearchResultItem #11

Open thlmemphis opened 10 years ago

thlmemphis commented 10 years ago

modelBuilder.EntitySet("MaterialSearch");

Causes all of my odata requests to have a serialization error due to null collections.

Autohaus is a non MVC project but I need to replicate the odata functionality almost exactly has done in the demo with a MVC sitecore 7.1 site. For this to work properly I had to upgrade to OData 5.1.x

Do you know how that might affect this?

Also, my classes that inherit from SearchResultItem are requiring that I have DataContract and DataMember attributes and I feel like that may be part of the problem. The Car class in Autohaus does not have those attributes and fields that are not explicitly in the class are in the odata result from SearchResultItem.