To any RIA Services gurus out there, anyone know how to increase the data buffer size ceiling of RIA Services query data coming back to the Silverlight client?
I have a RIA Services query where it is returning a parent entity along with quite a few child entity collections coming back as part of the data response. The code for my RIA Services query begins like this:
1: [EnableClientAccess()] 2: public class ContactsDomainService : LinqToEntitiesDomainService 3: { 4: [Query(ResultLimit = 150)] 5: public IQueryable SearchContacts(string jobFunction = default(string), 6: string workPhone = default(string), 7: string officeLocation = default(string), 8: string firstName = default(string), 9: string lastName = default(string), 10: string address1 = default(string), 11: string address2 = default(string), 12: string city = default(string), 13: int stateTypeId = 0, 14: string zip = default(string), 15: string email = default(string), 16: Nullable departmentTypeId = null, 17: Nullable sectionTypeId = null, 18: Nullable divisionTypeId = null, 19: Nullable governmentTypeId = null) 20: { 21: var results = from r in this.ObjectContext.Contacts 22: .Include("ContactAddresses") 23: .Include("ContactAddresses.CityType") 24: .Include("ContactAddresses.StateType") 25: .Include("ContactDepartments") 26: .Include("ContactDepartments.DepartmentType") 27: .Include("ContactDivisions") 28: .Include("ContactDivisions.DivisionType") 29: .Include("ContactEmails") 30: .Include("ContactGovernments") 31: .Include("ContactGovernments.GovernmentType") 32: .Include("ContactJobFunctions") 33: .Include("ContactJobFunctions.JobFunctionType") 34: .Include("ContactOffices") 35: .Include("ContactPhones") 36: .Include("ContactPhones.PhoneType") 37: .Include("ContactSections") 38: .Include("ContactSections.SectionType") 39: select r;
I have confirmed thru testing that the [Query(ResultLimit = 150)] decorator will cause the overall RIA Services query, SearchContacts(), to fail and throw and exception if you increase 150 to 500. I am guessing I'm hitting an overall data limitation of RIA Services.
I googled a bit for this issue and it looks like you can increase the data buffer size of a WCF Web Service (note WCF Service, not RIA Service), by editing the web config settings, but not sure if this would also work in a RIA Services query.
If anyone has come across the same issue and found a resolution, please respond.
thanks in advance, John