ADO.Net डेटा सेवाओं ग्राहक का उपयोग करते समय फोन करके एक इकाई को ताज़ा करने के LoadProperty
:संसाधन खंड के लिए नहीं मिला 'संपत्ति'
ctx.BeginLoadProperty(this, "Owner", (IAsyncResult ar) => ...
यह सर्वर पर कोई त्रुटि फेंकता है तो संपत्ति null
Error: Exception Thrown: System.Data.Services.DataServiceException: Resource not found for the segment 'Owner'. at System.Data.Services.RequestDescription.GetSingleResultFromEnumerable(SegmentInfo segmentInfo) at System.Data.Services.DataService1.CompareETagAndWriteResponse(RequestDescription description, ContentFormat responseFormat, IDataService dataService)
at System.Data.Services.DataService1.SerializeResponseBody(RequestDescription description, IDataService dataService) at System.Data.Services.DataService1.HandleNonBatchRequest(RequestDescription description) at System.Data.Services.DataService`1.HandleRequest()
समस्या यह है कि ग्राहक नहीं जानता कि संपत्ति null
है या अभी तक अभी तक पॉप्युलेट नहीं हुई है। संपत्ति मालिक Vehicle
से Customer
पर एक लिंक है।
कोई विचार क्या गलत है?
धन्यवाद
यह [अन्य उत्तर] (http://stackoverflow.com/questions/505761/resource-not-found-for-segment-property/5987733#5987733) एक बेहतर विकल्प है। अधिक पठनीय कोड के लिए बनाता है। –