例如,您有一个带有title的存储过程:sp_test
当您拖入LinqToSql时,它将生成一个sp_testResult
以存储过程输出列作为其属性的类。
我想知道LinqToSql如何区分存储过程的输出结果?
SqlCommandBuilder.GetSchemaTable(...)
可悲的是,这里发生的事情protected
。
SqlCommand command; // setup as SP
using (SqlDataReader reader = command.ExecuteReader(
CommandBehavior.KeyInfo | CommandBehavior.SchemaOnly))
{
return reader.GetSchemaTable();
}
结果DataTable
将包含输出架构。
如果我没记错的话,您不必为此工作传递参数。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句