问题的代码是:
return GetAll().Where(p => DateTime.Parse(p.F_YearMonth) <= _lastTimeCloseAccount_Date).ToList();
解决的代码是:
return GetAll().Where(p => SqlFunctions.DateAdd("day", 0, p.F_YearMonth+"-01") <= _lastTimeCloseAccount_Date).ToList();
SqlFunctions是因为
https://blog.csdn.net/u011127019/article/details/53992858
这篇文章给的启发,然后自己调整了一下