TAILIEUCHUNG - Lập trình .net 4.0 và visual studio 2010 part 28

VS2010 có một mô hình cửa sổ trình duyệt mới cho phép bạn dễ dàng điều hướng EDM của bạn (hình 8-10). Nó đáng chú ý là trước đó tại EF nếu một thực thể đã được gỡ bỏ từ mô hình và sau đó đưa trở lại bằng cách sử dụng chức năng cập nhật của wizard mô hình, sau đó nó sẽ không được tái tạo. Điều này là vì một tham chiếu đến đối tượng gốc vẫn còn tồn tại trong tập tin CSDL, do đó, EF tin rằng nó vẫn còn tồn tại | CHAPTER 8 ENTITY FRAMEWORK domain-driven design . I believe this release has resolved a number of the original concerns and introduced some great new features. Let s see what they changed. EDM Designer Changes VS2010 contains a new Model Browser window that allows you to easily navigate your EDM Figure 8-10 . It is worth noting that previously in EF if an entity was removed from the model and subsequently brought back by using the wizard s update model functionality then it would not be recreated. This was because a reference to the original object was still held in the CSDL file so EF believed it still existed. In VS2010 the Model Browser window now contains a new facility that allows you to remove the CSDL entries as well. To do this simply right-click on the item you want to remove under the Store node and select Delete. This will then remove the entity from the storage model. Model Browser X Type here to search g 4 BookModel a C Film FilmID 2 Description 25 Length Title FilmShowings g FilmShowing 3 FilmShowingID FilmID 223 Screen Showing Date S Film Orderitems i l Order i l Orderitem -j Complex Types g -J Associations g EntityContainer BookEntities g f j Entity Sets Films FilmShowings Orderitems Orders g J Association Sets l j FK_FilmShowing_Film FK_Orderltem_FilmShowing FK_Orderltem_Order a Function Imports g Qj BookModel. Store 9 J Tables Views 9 Film g FilmShowing ffl Order g Orderitem J Stored Procedures g Constraints yj FK_FilmShowing_Film yj FK_Orderltem_FilmShowing y_j FK_Orderltem_Order Figure 8-10. New model browser window 190 CHAPTER 8 ENTITY FRAMEWORK Performance The EF team has fine-tuned the performance of EF. One area that was improved is query generation. Previously parameter length was passed into queries. This was a bad decision parameters could vary in length which would prevent SQL Server from utilizing the query cache. In EF4 parameter length is no longer passed so the query cache can be utilized. The team has also tweaked

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.