如何将以下SQL查询转换为Linq?
create procedure sp_summary(date datetime)
as
Begin
Declare @v1 varchar(10)
.....
.....
exec sp_sub_1
exec sp_sub_2
....
exec sp_sub_10
....
....
End
请帮助我,谢谢
答案 0 :(得分:0)
var result = ServiceCalls
.Where(s => s.Ser_CallDate.Month == DateTime.Now.Month
&& s.Ser_CallDate.Year == DateTime.Now.Year)
.GroupBy(s => s.Ser_CallDate)
.Select(g => new {
OrderDate = g.Key,
TotalCall = g.Count()})
.ToList();