RIA Servicesの専門家には、RIA Servicesのクエリデータのデータバッファサイズの上限をSilverlightクライアントに戻す方法を知っていますか?RIA Servicesクエリのデータバッファサイズの上限を上げるにはどうすればよいですか?
私はRIA Servicesクエリを持っています。ここでは、データ応答の一部として戻ってくる子エンティティコレクションの数が多く、親エンティティが返されています。私のRIAサービスのクエリのコードは次のように始まる:
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;
私はテストを通して確認されていること、[クエリー(RESULTLIMIT = 150)]全体的なRIA Servicesのクエリ、SearchContacts()、失敗するとスローの原因となりますデコレータ150〜500を増やしても例外はありません。私はRIA Servicesの全体的なデータ制限に打撃を与えていると推測しています。
私はこの問題を少し調べました.WCF Webサービス(RIAサービスではなくWCFサービスに注意してください)のデータバッファサイズを増やすことができますが、Web設定を編集することで可能ですRIA Servicesクエリでも動作します。
誰かが同じ問題を抱えて解決を見つけた場合は、返信してください。事前に
おかげで、 ジョン
ジーン、リンク...トリックをやってくれてありがとう!マイクロソフトがこれを達成する方法を正確に宣伝していないことを少し奇妙に思えば...少なくともバッファサイズを増やす方法を示す例をweb.configのコメントに追加するのは良いことでした。 –