Click here to Skip to main content
15,922,145 members

Comments by maryamm7 (Top 3 by date)

maryamm7 22-May-15 14:34pm View    
Thank you , it is a solution but I like a answer in Linq To Sql!
maryamm7 22-May-15 14:33pm View    
Thank you , it is like a bug in Linq To Sql!
maryamm7 21-May-15 12:41pm View    
for example I have a simple query like this : var productList = products.GroupBy(s => new { s.LastSale }).ToList(); for each group that exists in product table one query generate , below is what I see in sql profiler i see 3 seperate query because I have 3 groups in product table :
1.exec sp_executesql N'SELECT [t0].[ID], [t0].[Description], [t0].[Discontinued], [t0].[LastSale]
FROM [dbo].[Product] AS [t0]
WHERE @x1 = [t0].[LastSale]',N'@x1 date',@x1='2015-02-07'

2.exec sp_executesql N'SELECT [t0].[ID], [t0].[Description], [t0].[Discontinued], [t0].[LastSale]
FROM [dbo].[Product] AS [t0]
WHERE @x1 = [t0].[LastSale]',N'@x1 date',@x1='2015-04-08'

3.exec sp_executesql N'SELECT [t0].[ID], [t0].[Description], [t0].[Discontinued], [t0].[LastSale]
FROM [dbo].[Product] AS [t0]
WHERE @x1 = [t0].[LastSale]',N'@x1 date',@x1='2015-04-09'