For My Entity FrameWork, in the For Loop
While working Evaluating, serial number 4 5 and 6
I should get the previous Tansaction(Transaction Sequence - 1) row
Ex: for SerialNumber 4, the previuos transaction is 1, same way for 5 its 2 and for 6 its 3
I tried below, it did not work
var previousTransactions = transactions .Where(pt => pt.Check_Number == t. Check_Number //&& pt.Check_Version == t. pt.Check_Version && pt.Transaction_Sequence == Transaction_Sequence).FirstOrDefault(); //.OrderByDescending(pt => pt.Sequence_Number).FirstOrDefault()); .Distinct(new TransactionComparer()); }