Beginning Microsoft Visual C# 2008 PHẦN 8

Mặc dù bạn sẽ không kiểm tra tất cả các lớp học cụ thể, chương này đi vào chiều sâu đủ để cung cấp cho bạn một ý tưởng tốt đẹp của các khái niệm và nguyên tắc cơ bản. Tập tin có thể là một cách tuyệt vời để lưu trữ dữ liệu giữa các trường hợp ứng dụng của bạn, hoặc họ có thể được sử dụng để truyền dữ liệu giữa các ứng dụng. | Chapter 27 LINQ to SQL foreach Order o in t t 0 t 1 Press Enter Return to continue. 6. Compile and execute the program you can just press F5 for Start Debugging . You will see the information for customers in the . and their orders as follows this is the last part of the output the first part scrolls off the top of the console window Customer Trail s Head Gourmet Provisioners Kirkland WA 3 orders Order ID Order Date 10574 6 19 1997 12 00 00 AM 10577 6 23 1997 12 00 00 AM 10822 1 8 1998 12 00 00 AM Customer White Clover Markets Seattle WA 14 orders Order ID Order Date 10269 7 31 1996 12 00 00 AM 10344 11 1 1996 12 00 00 AM 10469 3 10 1997 12 00 00 AM 10483 3 24 1997 12 00 00 AM 10504 4 11 1997 12 00 00 AM 10596 7 11 1997 12 00 00 AM 10693 10 6 1997 12 00 00 AM 10696 10 8 1997 12 00 00 AM 10723 10 30 1997 12 00 00 AM 10740 11 13 1997 12 00 00 AM 10861 1 30 1998 12 00 00 AM 10904 2 24 1998 12 00 00 AM 11032 4 17 1998 12 00 00 AM 11066 5 1 1998 12 00 00 AM Press Enter Return to continue. As before press Enter Return to finish the program and make the console screen disappear. How It Works You modified your previous program instead of creating a new program from scratch so you did not have to repeat all the steps to create the LINQ to SQL mapping source file note that the sample code has separate projects each with its own instance of . By dragging the Orders table in from the Database Explorer window you added the Order class to the source file to represent the Orders table in your mapping of the Northwind database. The O R Designer also detected the relationship in the database between Customers and Orders adding an Orders collection member to the Customer class to represent the relationship. All this was done automatically as when you add new controls to a form. 909 Part IV Data Access If you look before and after you add a database

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.