EDI raw data creation

Feb 11, 2014 at 11:48 AM
Hi Al,
   I am trying to create a edi raw data for X12(270 format). How can I create the raw data text and is there any way so that I can map my DB(Sql) columns or objects to the edifabric INTERCHANGE object??
Feb 12, 2014 at 9:32 PM
You should do this manually, no bespoke maps I'm afraid.
Feb 17, 2014 at 9:46 AM
After adding manually the data I am getting is like below(in xml view)

    <D_1035_3>FLORIDA BLUE</D_1035_3>
    <C_C035 />
  <S_DMG />
    <C_C052 />
    <C_C022 />
    <C_C022_2 />
    <C_C022_3 />
    <C_C022_4 />
    <C_C022_5 />
    <C_C022_6 />
    <C_C022_7 />
    <C_C022_8 />
    <C_C022_9 />
    <C_C022_10 />
    <C_C022_11 />
    <C_C022_12 />

so how can I skip the blank segments while getting the edi message.
Feb 17, 2014 at 11:47 AM
While setting Interchage Control Standards Ident to "^" am not getting anything in edi message.
Currently I am using
var m270edi = ediParser.ToEdi(interchange, null, null);

But When I am using U , I am getting U in EDI raw Message. So if I want "^" as the required output what I should do??
Apr 7, 2014 at 6:22 PM
As far as I remember blank elements were automatically omitted. don't know why are you getting these - perhaps your edi message has got blanks in it ?
Apr 7, 2014 at 6:29 PM
You need to supply a segment terminator, please have a look at unit test TestToEdiWithSegmentsComparisonAndNonDefaultSeparators() and call it like this:

var interchangeContext = new Entities.InterchangeContext();
        interchangeContext.SegmentTerminator = "^";
        var parsedEdi = ediParser.ToEdi(XElement.Load(Assembly.GetExecutingAssembly().GetManifestResourceStream(Sample)), null, interchangeContext);
Apr 16, 2014 at 5:58 PM
sumit002 ,
I was facing the same issue . I resolved it by first create object and then assign all unnecessary child objects to null this will avoid empty elements creation in xml
   clm.S_SV1 = new S_SV1();
                clm.S_SV1.C_C003 = null;
                clm.S_SV1.C_C004 = null;
Apr 30, 2014 at 8:15 AM
This has now been resolved in Release 2.0