我想在我的选择查询中动态放置列名。我怎么能做到这一点?
public IEnumerable MyTable MySelect(string colName, string param)
{
using (MyEntities db = new MyEntities ())
{
var query = from res in db.MyTable
where res.colName.Contains(param)
select res;
return query;
}
}