What is the best way to translate an AX 2012 X++ select statement to loop through multiple records like the X++ code below into an AX C# project using the C# language?
I am looking to write as little as possible in X++ and right now trying to find out the best way to select a set of records and loop through them in C#.
Is there something comparable I can use in C# in place of the code below?
Is it necessary to create an AX helper class/method to perform the AX select statement and then return that table object back to my C# class/method? If so what container object is best to return multiple records??
Thank you for your help
// Example X++ code
while select ledgerTrans
order by accountNum, transDate
where ledgerTrans.accountNum >= '11100'
&& ledgerTrans.accountNum <= '11190'
&& ledgerTrans.transDate >= 01\07\1999
&& ledgerTrans.transDate <= 30\06\2000
{
// Do whatever is needed.
}