EDI.Net icon indicating copy to clipboard operation
EDI.Net copied to clipboard

POCO Annotation from EDI Documentation Examples

Open cvboucher opened this issue 3 years ago • 1 comments

I need to deserialize the following EDI format/files into POCO classes.

https://static.ark.org/eeuploads/adhe/TS130.pdf

I'm a .Net developer but brand new to EDI. Are there some examples on how to structure and annotate POCO's from the EDI documentation? I've looked at the example POCO's here but it's still not clear how to translate from the documentation to the classes.

Thanks.

cvboucher avatar Mar 11 '22 20:03 cvboucher

var grammar = EdiGrammar.NewX12();

 var interchange = default(GenericX12);
            using (var stream = new StreamReader(filePath))
            {
                interchange = new EdiSerializer().Deserialize<Generic834>(stream, grammar);
            }

Where GenericX12 is your POCO class.

tcsyring avatar Apr 21 '22 13:04 tcsyring