标签:style blog color ar strong sp div on log
1. 一对多
var expr = context.Products .Where(p => p.Category.CategoryName == "LINQ to SQL" && p.UnitPrice > 10m) .Select(p => new { p.ProductID, p.ProductName });
var expr = from p in context.Products where p.Category.CategoryName == "LINQ to SQL" && p.UnitPrice > 10m select new { p.ProductID, p.ProductName };
SELECT [Extent1].[ProductID] AS [ProductID], [Extent1].[ProductName] AS [ProductName] FROM [dbo].[Product] AS [Extent1] INNER JOIN [dbo].[Category] AS [Extent2] ON [Extent1].[CategoryID] = [Extent2].[CategoryID] WHERE (N‘LINQ to SQL‘ = [Extent2].[CategoryName]) AND ([Extent1].[UnitPrice] > cast(10 as decimal(18)))
标签:style blog color ar strong sp div on log
原文地址:http://www.cnblogs.com/libingql/p/4052906.html