Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
ASP.NET 4 Unleased - p 100
Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET 4 Unleased - p 100
Long Quân
127
10
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Thực hiện các lệnh với tiêu chuẩn cơ sở dữ liệu LINQ to SQL Trong phần này, bạn học cách sử dụng LINQ to SQL như là thay thế một để làm việc trực tiếp với SQL. Chúng tôi bắt đầu bằng việc thảo luận làm thế nào LINQ to SQL truy vấn khác với tiêu chuẩn truy vấn LINQ. | 964 CHAPTER 20 Data Access with LINQ to SQL Performing Standard Database Commands with LINQ to SQL In this section you learn how to use LINQ to SQL as a replacement for working directly with SQL. We start by discussing how LINQ to SQL queries differ from standard LINQ queries. Next we examine how you can perform standard database queries and commands using LINQ to SQL such as Select Update Insert and Delete commands. We ll also discuss how you can create dynamic queries with LINQ. Finally we investigate the important topic of how you can debug LINQ to SQL queries. LINQ to Objects Versus LINQ to SQL You can use standard LINQ LINQ to Objects with any object that implements the IEnumerable T interface interface . You can use LINQ to SQL on the other hand with any object that implements the IQueryable T interface. Standard LINQ is implemented with the extension methods exposed by the System.Linq.Enumerable class. LINQ to SQL on the other hand uses the extension methods exposed by the System.Linq.Queryable class. Why the difference When you build a query using standard LINQ the query executes immediately. When you build a query using LINQ to SQL on the hand the query does not execute until you start enumerating the results. In other words the query doesn t execute until you use a foreach loop to walk through the query results. Consider the following valid LINQ to SQL query var query tMovie.Where m m.Director Steven Spielberg .OrderBy m m.BoxOfficeTotals .Select m m.Title This query returns a list of movies directed by Steven Spielberg in order of the movie box office totals. You want LINQ to SQL to execute this query against the database in the most efficient way possible. In particular you don t want LINQ to SQL to execute each method independently you want LINQ to SQL to execute one smart database query. When executing this query it would be bad if LINQ to SQL 1 grabbed all the Movie records that were directed by Steven Spielberg 2 sorted the records and then 3 .
TÀI LIỆU LIÊN QUAN
crossorigin="anonymous">
Đã 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.