我需要显示本月的数据(从月开始到月结束的数据)
我知道如何在MySQL中进行以下查询
enter code here select @MonthAmount := IFNULL(sum(AmountReceived), 0.0) as TotoalAmountperMonth
from collection
where date_time between DATE_FORMAT(NOW() ,'%Y-%m-01')
and LAST_DAY(now() - interval 0 month ) and AgentID=v_agent) as monthamount
但如何使用实体(lambda表达式),当我在谷歌上搜索到今天但在一个月内得到的数据时,我对实体是陌生的?
下面的查询得到了今天数据的结果
enter code here var newAuctionsResults = repo.FindAllAuctions()
.Where(a => a.IsActive == true
|| (a.StartTime.Value.Year == todayYear
&& a.StartTime.Value.Month == todayMonth
&& a.StartTime.Value.Day == todayDay))
.ToList();