Free code to master you EDI files

Article author
  • Updated

The EDI C# examples are Visual Studio solutions that showcase all the features of EDI Tools for .NET.

If you have EDI files that you wonder how to quickly read or parse, look no further! It only takes a minute to download the trial, open the Demo project, change the path to point to your EDI file, and start debugging it. Job done!

Download Free Trial

No account or payment details are required, simply download it, unzip it, and get started.

All information on how to use the C# example is available in the solutions "ReadMe" files or below in this article.



  • Visual Studio or Visual Studio Code, compatible with the supported .NET versions
  • All projects target .NET Framework 4.5, however, the Target Framework from each project's properties can be changed to .NET Core 3.1
  • EdiFabric trial DLLs and serial number.


Install the trial version of EDI Tools for .NET

Unzip, open, and rebuild the solution for your chosen EDI standard. If there are any build errors, contact us for assistance. The trial DLLs are in folders net45 (for .NET Framework 4.5+) and netcoreapp3.1 (for .NET Core 3.1+).


Serial Key

The serial key is included in the "serial.key" file in the "edifabric-trial" folder. Ensure it is there and that the file is not empty.

The serial key is loaded programmatically in the "SerialKey.cs" file of every common project for the X12, EDIFACT, VDA, HL7, NCPDP, or FlatFile examples. Open the file and ensure that the serialKeyPath is correct.


If the serial key is invalid or the file is missing, contact us for assistance.


Get started

To get started, open the examples solution for your chosen EDI standard, and then follow the instructions in the README file.

The examples in each solution are organized into different projects in two logical categories: by product feature and by message type.


Examples by feature

Explore the different features of EdiFabric, such as:

  • parse EDI file (ReadEDI)
  • generate EDI file (WriteEDI),
  • validate EDI transactions (ValidateEDI),
  • import/export from/to JSON, XML, CSV
  • create/save/query database (DB)
  • generate 997, 999, or CONTRL acknowledgments (AcknowledgeEDI)
  • map to/from an EDI template using Automapper and XSLT (MapEDI).


Examples by message type

Explore how to translate from and generate several of the most popular X12, HIPAA, EDIFACT, EANCOM, HL7, NCPDP Telecommunication, NCPDP SCRIPT, VDA, and flat file transactions.

The trial supports all message types for the following EDI versions (click on each version to see a list of supported EDI transactions):

Standard EDI templates

Custom EDI templates

  • CUSCAR and PAXLST version EDIFACT D03B for US Customs
  • BAPLIE version EDIFACT D13B for SMDG
  • Flat Files

Please let us know if you need to test with a message type in a different version, and we'll send it to you.

All messages (transactions) are represented by EDI templates, which are available for the versions listed above in the following DLLs:

  • EdiFabric.Templates.X12.dll
  • EdiFabric.Templates.Hipaa.dll
  • EdiFabric.Templates.Edifact.dll
  • EdiFabric.Templates.Hl7.dll
  • EdiFabric.Templates.Ncpdp.dll
  • EdiFabric.Templates.Padis.dll
  • EdiFabric.Templates.Vda.dll
  • EdiFabric.Templates.Edigas.dll

To access a particular EDI template in code, add a DLL reference for the EDI standard you want to evaluate, and then access the template like this:

  • EdiFabric.Templates.X12004010.TS + {the EDI transaction ID, such as 810 or 850}

    Example for 810:

  • EdiFabric.Templates.EdifactD96A.TS + {the EDI transaction ID, such as INVOIC or ORDERS}

    Example for INVOIC:

  • EdiFabric.Templates.Hl726.TS + {the EDI transaction ID, such as ADT or QBP}

    Example for ADTA01:

  • EdiFabric.Templates.TelcoD0.TS + {the EDI transaction ID, such as B1 or B2}

    Example for B1:

  • EdiFabric.Templates.Script106.TS + {the EDI transaction ID, such as NEWRX or RXFILL}

    Example for NEWRX:

  • EdiFabric.Templates.Vda.TS + {the EDI transaction ID, such as 4905 or 4908}

    Example for 4905:



EDI Validation

All templates in the template DLLs can be used for validation.



All C# EDI examples are also available on GitHub, although, you still need to download the serial key from our website (use the button at the top of the page).


Trial License

The trial assemblies are valid for 14 days and are subject to EdiFabric's EULA. Upon expiry, the trial DLLs will begin throwing exceptions.
To continue using the trial and the examples, you'll need to either request a trial extension or replace the trial DLLs with the paid version of EdiFabric.



The source code in these example projects is strictly for demonstrational purposes and is provided "AS IS" without warranty of any kind, whether expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Share this:

Was this article helpful?



Please sign in to leave a comment.