【发布时间】:2010-08-27 13:43:55
【问题描述】:
我有这个方法用了一段时间
public string getSlotText(int slotID)
{
DataClasses1DataContext context = new DataClasses1DataContext();
var slotString = context.spGetSlotTextBySlotID(slotID);
return slotString.ElementAt(0).slotText;
}
但我现在真正想要的是类似
public var getSlotText(int slotID)
{
DataClasses1DataContext context = new DataClasses1DataContext();
var slotString = context.spGetSlotTextBySlotID(slotID);
return slotString;
}
因为 slotString 中有多个元素。我看到了一些其他示例,但没有一个使用 LINQ 调用存储过程。
任何帮助都会很棒,非常感谢。
非常感谢
提姆
【问题讨论】:
标签: c# linq linq-to-sql stored-procedures output-parameter