string.Join 拼接在sql中特殊处理
string strTripID = string.Join(",", model.TripList.Select(s => "'" + s.TripID + "'")); var togetherList = itogetheremployeeservice.GetTogetherEmployee(strTripID); public List<T_TOGETHEREMPLOYEE> GetTogetherEmployee(string bizID) { var tmpList = Filter(item => bizID.Contains(item.BizID)).ToList(); return tmpList; } // string str = string.Join(",", App.Select(s => "'" + s + "'")); string strTripID = string.Join(",", returnValue.TripList.Select(s => "'" + s.TripID + "'")); string sqlStr = " select * from T_TOGETHEREMPLOYEE where BizID in (" + strTripID + ") "; var togetherList = AppBaseServiceHelper.GetList<TOGETHEREMPLOYEEModel>(sqlStr, null);