Documentation

Introduction

Article author
Admin
  • Updated

EdiFabric 11.0.0 is a .NET SDK that parses, generates, validates, acknowledges, and splits EDI files. It is written in C# and shipped as the EdiFabric NuGet package.

EdiFabric does not include communication components (AS2 or SFTP), a dashboard, or a UI. It is a library you call from your own application.

Sign up free for Community   Run the X12 examples

Start here

  1. Sign up free for Community and copy your serial key from Your Account. Community never expires, needs no credit card, and is limited to 250 operations per day for non-production use.
  2. Install the package, or clone an examples repository and let NuGet restore pull EdiFabric 11.0.0.

    dotnet add package EdiFabric
  3. Authorize before you read or write. On Community that is License.SetSerial.

    using EdiFabric.Core.Model.Edi;
    
    License.SetSerial(serial);   // from your Community or paid plan
  4. Parse a file. The X12 examples read Files/X12/PurchaseOrders.txt like this:

    using EdiFabric.Framework.Readers;
    using EdiFabric.Templates.X12004010;
    
    var ediStream = File.OpenRead(@"Files\X12\PurchaseOrders.txt");
    
    List<IEdiItem> ediItems;
    using (var ediReader = new X12Reader(ediStream, "EdiFabric.Templates.X12"))
        ediItems = ediReader.ReadToEnd().ToList();
    
    var purchaseOrders = ediItems.OfType<TS850>();

To see that path already wired up, clone X12.NET, paste your serial into TrialSerialKey in NET Framework 4.8/EdiFabric.Examples.X12.Common/Config.cs, and run EdiFabric.Examples.X12.Demo. The .NET 6 projects link that file, so one edit covers both solutions.

cd "NET 6/EdiFabric.Examples.X12.Demo"
dotnet run

Other standards use the same steps: EDIFACT, HL7, NCPDP, SCRIPT, VDA, and flat files. Each README is the project list for that standard. There is also a ZIP of the examples if you want the solutions offline.

Prefer to build the project yourself? Follow Install EdiFabric, then How to create EDI template projects, or the step-by-step tutorial.

Compatibility with .NET

EdiFabric 11.0.0 targets the frameworks below. The example solutions ship as .NET 6 (net6.0) and .NET Framework 4.8 so they stay compatible with existing apps. To evaluate .NET 8, 9, or 10, change TargetFramework in the project file and rebuild.

Target Where it runs
.NET 8, .NET 9, .NET 10 Windows, Linux, macOS, including AWS and Azure
.NET Framework 4.8 Windows and Azure

You need Visual Studio 2022 or the .NET SDK. Download Visual Studio.

Serial key and license

Sign up free for the Community plan to get an evaluation serial key. After signup, copy it from Your Account.

One operation is one parse, generate, validate, or acknowledge call. The 250-a-day quota is shared across ediFabric .NET, Native, and Cloud. If you hit it, calls throw LicenseException with error 639. Upgrade at edifabric.com/pricing to continue.

The same serial covers ediFabric .NET, Native, and Cloud on that plan. Moving to Developer or Enterprise is a key swap. Use of the product is subject to the EULA.

Plan What works Call this
Community License.SetSerial only. Online check. 250 operations per day. Non-production. License.SetSerial
Developer License.SetSerial and License.EnsureToken. EnsureToken caches the result for 1 day. License.EnsureToken
Enterprise License.SetSerial, License.GetToken, and License.SetToken. License.SetToken (offline tokens)
// Community: authorize against the license server
License.SetSerial(serial);

// Developer (recommended): 1-day built-in cache; refreshes if the token expires within N seconds
License.EnsureToken(serial, seconds: 3600);

// Enterprise: set an offline token
License.SetToken(token);

The examples call License.SetSerial(Config.TrialSerialKey). On Developer, call License.EnsureToken instead. TokenFileCache.Set() in the examples' Common project is the manual GetToken / SetToken cache, for when you want to store the token yourself. Enterprise offline tokens are issued after purchase. During an Enterprise trial, use License.EnsureToken.

Error 635 means no serial or token was set. Error 639 means the Community daily quota was exceeded. The full code list is in each examples README, for example X12 error codes.

Data security

Parse, generate, validate, and acknowledge all run in the process that started them. EDI data stays on your network. The license call is the only traffic to EdiFabric, and it sends the serial or token, not the file. Privacy policy.

  • Community. License.SetSerial checks the license server. The check is online.
  • Developer. License.EnsureToken caches the result for one day, so a later outage or a long batch keeps running.
  • Enterprise. License.SetToken applies an offline token. After the token is set, translation does not contact EdiFabric.

Supported EDI standards

EdiFabric supports the message types for X12, HIPAA, EDIFACT, HL7, NCPDP Telecommunication, NCPDP SCRIPT, and VDA, plus custom flat files (delimited, positional, or a mixture of both). Each message is a .NET class called an EDI template. What an EDI template is.

The models on NuGet, such as EdiFabric.Templates.X12 and EdiFabric.Templates.Edifact, are for evaluation only. They are a Community plan limitation, which is why the examples reference them. Paid plans provide every template as plain C# files. Add those files with How to create EDI template projects.

If a transaction is missing, ask for it. Browse the catalog without an account in the EdiNation spec library.

Share this:

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.