Free code to master your EDI files

Article author
  • Updated

The EDI C# examples are Visual Studio solutions (one per EDI standard) that showcase all the features of EDI Tools for .NET.

Download EdiFabric EDI Tools (including local NuGet packages and DLLs)

Download EdiFabric EDI Tools from GitHub

All information on how to use the C# examples is available in the solution's "README" files or below in this article.



  • Visual Studio or Visual Studio Code, compatible with the supported .NET versions.
  • Minimum .NET Framework 4.8 or .NET 6. Downgrading to .NET Framework 4.5 is possible by changing the target framework for each project.


Install the C# examples

Download, unzip, and open the solution for your chosen EDI standard. 

Rebuild the solution with Package Restore enabled. If there are any build errors, manually install the missing packages from NuGet.


Serial Key

The trial comes with a provisional serial key that is valid for 14 days:



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

If you need to test with a message type in a different version, install the templates for that version from EdiNation.

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

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

To access a particular EDI template in code, install the NuGet package or 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.


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 purchase a plan.



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.