A First Look at ObjectSpaces in Visual Studio “Whidbey”.

來源:互聯網
上載者:User

ObjectSpaces是將整合在Whidbey中的O/R Mapping組件。

具體參見:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/objectspaces.asp

即將release的ObjectSpaces暫時只支援SQL Server 2000 & SQL Server Yukon。

在執行查詢的時候,ObjectSpaces使用的是稱之為OPath的query string,並且還將支援稱之為Span的參數,用於指定是否級聯返回一個對象的子物件集合:

“A span is a comma-separated string that identifies related objects that will be returned by the query. Specifying a span value of "Orders" ensures that the Order objects related to any Customer object are returned by the query as well. All orders are automatically packed into the Orders property.”

為了提高效能和節省記憶體,ObjectSpaces在裝載子物件集合的時候採用了Delay Loading的技術。也就是等到在代碼中真正需要用到那個對象的時候才去從資料庫中載入。

“To improve performance and memory use in parent/child relationships, ObjectSpaces provides a facility known as "delay loading". It works both for one-to-many and one-to-one relationships. The idea is that child objects are loaded in memory and on demand only at the time that they are requested.”

大概看了一下那個文章,可能因為只是first look的緣故,感覺舉的例子中的資料結構還是比較簡單,感覺功能還不是很強,不足以描述那些有結構複雜的(有嵌套的樹形的結構)對象。不過微軟應該不會讓人失望的,只有等release出來之後才知道這個o/r mapping framework的廬山真面目:)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.