我有这种方法,它工作了一段时间
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 调用存储过程的示例。
任何帮助都会很棒,我将不胜感激。
非常感谢
蒂姆