【发布时间】:2022-01-14 15:15:14
【问题描述】:
我有一个控制器
public ActionResult Index(int[] eo){ employes = _context.Database.SqlQuery(select * from table where tableId IN (@p0),String.Join(",", eo))}
问题是@p0 的数据是作为字符串传递的,而TableID 是int。调试显示 @p0 为 ('10,2,3,5') 我想要的是 (10,2,3,5)。
我该如何处理这个问题?
【问题讨论】:
-
eo是什么类型?
标签: c# sql-server asp.net-mvc