有人知道为什么这会在@table 附近给我不正确的语法异常吗?
object[] changeQueryParams = new object[] { new SqlParameter("table", dbContext.tXSell.EntitySet.Name), new SqlParameter("fromversion", 0) };
string changeQueryString = @"SELECT * FROM CHANGETABLE(CHANGES @table, @fromversion) AS ch";
ObjectResult<object> changes = dbContext.ExecuteStoreQuery<object>(changeQueryString, changeQueryParams);
我正在使用 mssql 2008 r2、ef4、c#。