SqlReadOnlyTransactionRepository to X12

Aug 29, 2013 at 7:43 PM
Is it possible to transform the SqlReadOnlyTransactionRepository back to an X12 Interchange object? Is it advisable?

I intend on parsing and processing each file as it comes in on our inbound EDI server and saving to sql as I go. But occasionally I need to reprocess a file from another production server and if I can fetch the object from sql to reprocess it would solve that problem.
Aug 30, 2013 at 4:15 PM
You can simply pull the data from the [dbo].[Segment] table filtered by the InterchangeId ordered by sequence and concatenate the string and then parse it with the X12Parser to get your interchange object.
Aug 30, 2013 at 4:52 PM
Very cool. I didn't realize it was flattened to the interchange in the segment table. Thanks