LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this metho...

mac2022-06-30  104

if (!string.IsNullOrEmpty(FarmWorkId)) { data = data.Where(p => p.TypeId == Convert.ToInt32(FarmWorkId)); }

 

解决方法:

if (!string.IsNullOrEmpty(FarmWorkId)) { int i = Convert.ToInt32(FarmWorkId); data = data.Where(p => p.TypeId == i); }

转载于:https://www.cnblogs.com/siyunianhua/p/10027886.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)