if i try to write below codes : error return to me: The query results cannot be enumerated more than once
public void StartTransaction()
{
using (var stockMovementCtx = new StockMovementCtxDataContext())
using (var scope = new TransactionScope())
{
var stockMovementItems = from s in stockMovementCtx.spStockMovementForTransaction(TicketID, ItemTypeNo, ItemID, TransactionType,
FromLocation, ToLocation, Qty, PersonelNo, cuser
)
select s;
ReturnCode = stockMovementItems.First().ReturnCode;
// MessageBox.Show(stockMovementItems.First().ToString());
ReturnMsg = stockMovementItems.First().ReturnMessage;
TransactionType = stockMovementItems.First().TransactionType;
TicketID = stockMovementItems.First().TicketID;
Details:
Detail :