CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 22: 70-487: MCSD Developing Windows Azure and Web Services

You are developing an order processing application that uses the Entity Framework against a SQL Server database. Lazy loading has been disabled. The application displays orders and their associated order details. Order details are filtered based on the category of the product in each order. You need to return orders w…

Nội dung câu hỏi

You are developing an order processing application that uses the Entity Framework against a SQL Server database. Lazy loading has been disabled. The application displays orders and their associated order details. Order details are filtered based on the category of the product in each order. You need to return orders with their filtered list of order details included in a single round trip to the database. Which code segment should you use?

Minh họa câu hỏi

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. Lựa chọn A bằng hình ảnhLựa chọn A
  2. B. Lựa chọn B bằng hình ảnhLựa chọn B
  3. C. Lựa chọn C bằng hình ảnh — đáp án hiện tạiLựa chọn C
  4. D. Lựa chọn D bằng hình ảnhLựa chọn D
Giải thích

Explanation Eager loading is the process whereby a query for one type of entity also loads related entities as part of the query. Eager loading is achieved by use of the Include method. For example, the queries below will load blogs and all the posts related to each blog. using (var context = new BloggingContext()){// Load all blogs and related postsvar blogs1 = context.Blogs.Include(b => b.Posts).ToList();It is also possible to eagerly load multiple levels of related entities.References:https://msdn.microsoft.com/en-us/library/jj574232(v=vs.113).aspx

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề