标签:style blog color ar strong sp div on log
1. CASE WHEN ... THEN ...
var expr = from p in context.Products select new { 商品ID = p.ProductID, 商品名称 = p.ProductName, 是否库存 = p.UnitsInStock > 0 ? "是" : "否" };
SELECT [Extent1].[ProductID] AS [ProductID], [Extent1].[ProductName] AS [ProductName], CASE WHEN ([Extent1].[UnitsInStock] > 0) THEN N‘是‘ ELSE N‘否‘ END AS [C1] FROM [dbo].[Product] AS [Extent1]
LINQ系列:LINQ to SQL Transact-SQL函数
标签:style blog color ar strong sp div on log
原文地址:http://www.cnblogs.com/libingql/p/4049400.html