Documentation

Free code to master you EDI files

Article author
Admin
  • 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.

 

Requirements

  • 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
  • The trial NuGet packages and a serial key

 

Install the trial version of EDI Tools for .NET

Unzip, open, and rebuild the solution for your chosen EDI standard. The latest version of the trial NuGet packages will be downloaded and installed automatically from nuget.org. If there are any build errors, contact us for assistance.

It is possible to manually reference the DLLs instead of the NuGet package. Uninstall all trial packages that start with EdiFabric.* and replace them with corresponding references to the DLLs in the "DLLs" folder.

 

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.

edifabric-serial-key.png

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 trial packages:

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

The template packages work only with the trial and can't be used with the paid version.

To access a particular EDI template in code, install the relevant package (or DLL reference) from the list above 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.X12004010.TS810
  • EdiFabric.Templates.EdifactD96A.TS + {the EDI transaction ID, such as INVOIC or ORDERS}

    Example for INVOIC:

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

    Example for ADTA01:

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

    Example for B1:

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

    Example for NEWRX:

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

    Example for 4905:

    EdiFabric.Templates.Vda.TS4905

 

EDI Validation

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

 

GitHub

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 packages 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 packages, together with all references to the trial packages, with the paid version of EdiFabric.

 

Warranty

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?

Comments

0 comments

Please sign in to leave a comment.