Epicor Switches from TableSet to DataSet ... mid service

Thanks Erik,
I did find the helper class, my issue with the WTF haha was that in this particular service I was using (server side) using the TableSets, there was one method that was using DataSets... I was confused as to why. This is all server side BPM using the ServiceRenderer, everything in this BO uses TableSets except one (maybe 2) methods. That's where my WTF came from... haha thanks for the insight
You are awesome as always!Â


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Thu, Aug 13, 2015 at 9:08 AM, ejohnson@... [vantage] <vantage@yahoogroups.com> wrote:
Â
<div>
  
  
  <p></p><div>I can respond to the &quot;WTF Epicor&quot; question (it&#39;s something I do frequently).  Tablesets are just POCOs (plain old class objects).  We decided not to use Datasets on the server because they do not interoperate or serialize as well as a regular class.  We also annotate the types and members with WCF attributes to optimize communications and (attempt to) maximize interoperability with non-Windows SOAP stacks.  Also, POCOs work great with Lync (better than Datasets, IMO).</div><div><br></div><div>But the client controls all use databinding and other Dataset functionality -- we couldn&#39;t migrate all that to the Tableset POCOs.  So we convert between Datasets and Tablesets inside the client proxy.  There is no performance penalty compared to Epicor 9 because we did a similar conversion from between the dataset bound to controls and another Dataset which gets sent on the wire.</div><div><br></div><div>In any case, you can choose whether you want your code to use &quot;traditional&quot; Datasets or the Tableset POCOs.  The examples below show how to use either approach.  If you need to convert between the two approaches yourself, the helper class is in Epicor.ServiceModel (I think you&#39;ve found it already).  Hope this helps. </div><div><br></div><div>Example 1 (uses classic Datasets):</div><div><br></div><div><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">static</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">void</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">TestUsingProxy</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">()</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">{</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">wcfBinding</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">NetTcp</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">.UsernameWindowsChannel</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">();</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">appServer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">new</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">Uri</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">net.tcp</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">://</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">localhost</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">/epicor10/</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">erp</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">/</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">bo</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">/</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">part.svc</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">);</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">using</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> (</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partClient</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">new</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">PartImpl</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">(</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">wcfBinding</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">, </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">appServer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">))</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span>{</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partClient.ClientCredentials.UserName.UserName</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;Manager&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">;</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partClient.ClientCredentials.UserName.Password</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;Epicor123&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">;</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">bool</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">morePages</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">;</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">myPartDataset</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partClient.GetList</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">, 10, 1, </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">out</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">morePages</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">);</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">foreach</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> (</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partRec</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">in</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">myPartDataset.PartList.Rows.Cast</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">&lt;</span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">PartListDataSet</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">.</span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">PartListRow</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">&gt;())</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span>{ </span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>            </span></span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">Console</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">.WriteLine</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">(</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partRec.PartNum</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">); </span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span>}</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partClient.Close</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">();</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span>}</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">}</span></p></div><div><span style="font-size:14.0pt;font-family:Consolas;color:black;background:white;font-weight:bold;"><br></span></div><div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike>Example 2 (uses the new Tablesets):</div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">static</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">void</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">TestUsingDirectChannel</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">()</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">{</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">wcfBinding</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">NetTcp</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">.UsernameWindowsChannel</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">();</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">appServer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">new</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">Uri</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">net.tcp</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">://</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">localhost</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">/epicor10/</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">erp</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">/</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">bo</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">/</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">part.svc</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">);</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">using</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> (</span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">ChannelFactory</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">&lt;</span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">PartSvcContract</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">&gt;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">cf</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">new</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">ChannelFactory</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">&lt;</span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">PartSvcContract</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">&gt;(</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">wcfBinding</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">))</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span>{</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">cf.Credentials.UserName.UserName</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;Manager&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">;</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">cf.Credentials.UserName.Password</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;Epicor123&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">;</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>                </span></span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partClient</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">cf.CreateChannel</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">(</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">new</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">EndpointAddress</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">(</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">appServer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">));</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">bool</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">morePages</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">;</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">myPartTableset</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> = </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partClient.GetList</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#a31515;background:white;">&quot;&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">, 10, 1, </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">out</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">morePages</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">);</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">foreach</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> (</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">var</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partRec</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;background:white;">in</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"> </span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">myPartTableset.PartList</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">)</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span>{</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>            </span></span><span style="font-size:10.0pt;font-family:Consolas;color:#2b91af;background:white;">Console</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">.WriteLine</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">(</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">partRec.PartNum</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">);</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span>}</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>        </span></span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">cf.Close</span><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">();</span></p><p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;direction:ltr;"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;"><span>    </span>}</span></p><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white;">}</span><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></div><div><br></div><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

Has anyone run into this issue?

E10 using EngWorkBench Service on a BPM throughout the service calls Epicor uses EngWorkBenchTableset for everything except in this one callÂ

svc.UpdateCurrentECORev() it expects an EngWorkBenchDataSet.... does anyone know if there is an ez way to conovert a TableSet to a DataSet...Â
and also.. WTF Epicor...

I know I can loop through the properties using reflector and set them and all that. I was hoping there was a magical  casting or conversion somewhere...


Thanks!

Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?
Found it....Â
 tableset.<a rel=“nofollow” title="ECOGroupTable Erp.Tablesets.EngWorkBenchTableset.ECOGroup { … }

CTRL+Click to open in new tab." target="_blank" href=“http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://Erp.Contracts.BO.EngWorkBench:10.0.700.0:5d3fa3c7105d7992/Erp.Tablesets.EngWorkBenchTableset/property:ECOGroup:Erp.Tablesets.ECOGroupTable”>ECOGroup, set.<a rel=“nofollow” title="EngWorkBenchDataSet.ECOGroupDataTable Erp.BO.EngWorkBenchDataSet.ECOGroup { … }

CTRL+Click to open in new tab." target="_blank" href=“http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://Erp.Contracts.BO.EngWorkBench:10.0.700.0:5d3fa3c7105d7992/Erp.BO.EngWorkBenchDataSet/property:ECOGroup:Erp.BO.EngWorkBenchDataSet.ECOGroupDataTable”>ECOGroup);




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet
ipsos custodes?


On Wed, Aug 12, 2015 at 11:00 AM, Jose Gomez <jose@…> wrote:
Has anyone run into this issue?

E10 using EngWorkBench Service on a BPM throughout the service calls Epicor uses EngWorkBenchTableset for everything except in this one callÂ

svc.UpdateCurrentECORev() it expects an EngWorkBenchDataSet… does anyone know if there is an ez way to conovert a TableSet to a DataSet…Â
and also… WTF Epicor…

I know I can loop through the properties using reflector and set them and all that. I was hoping there was a magical  casting or conversion somewhere…


Thanks!

Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet
ipsos custodes?

I can respond to the "WTF Epicor" question (it's something I do frequently).  Tablesets are just POCOs (plain old class objects).  We decided not to use Datasets on the server because they do not interoperate or serialize as well as a regular class.  We also annotate the types and members with WCF attributes to optimize communications and (attempt to) maximize interoperability with non-Windows SOAP stacks.  Also, POCOs work great with Lync (better than Datasets, IMO).

But the client controls all use databinding and other Dataset functionality -- we couldn't migrate all that to the Tableset POCOs.  So we convert between Datasets and Tablesets inside the client proxy.  There is no performance penalty compared to Epicor 9 because we did a similar conversion from between the dataset bound to controls and another Dataset which gets sent on the wire.

In any case, you can choose whether you want your code to use "traditional" Datasets or the Tableset POCOs.  The examples below show how to use either approach.  If you need to convert between the two approaches yourself, the helper class is in Epicor.ServiceModel (I think you've found it already).  Hope this helps. 

Example 1 (uses classic Datasets):

static void TestUsingProxy()

{

    var wcfBinding = NetTcp.UsernameWindowsChannel();

    var appServer = new Uri("net.tcp://localhost/epicor10/erp/bo/part.svc");

    using (var partClient = new PartImpl(wcfBinding, appServer))

    {

        partClient.ClientCredentials.UserName.UserName = "Manager";

        partClient.ClientCredentials.UserName.Password = "Epicor123";

        bool morePages;

        var myPartDataset = partClient.GetList("", 10, 1, out morePages);

        foreach (var partRec in myPartDataset.PartList.Rows.Cast<PartListDataSet.PartListRow>())

        {

            Console.WriteLine(partRec.PartNum);

        }

        partClient.Close();

    }

}


Example 2 (uses the new Tablesets):



static void TestUsingDirectChannel()

{

    var wcfBinding = NetTcp.UsernameWindowsChannel();

    var appServer = new Uri("net.tcp://localhost/epicor10/erp/bo/part.svc");

    using (ChannelFactory<PartSvcContract>cf = new ChannelFactory<PartSvcContract>(wcfBinding))

    {

        cf.Credentials.UserName.UserName = "Manager";

        cf.Credentials.UserName.Password = "Epicor123";

               

        var partClient = cf.CreateChannel(new EndpointAddress(appServer));

        bool morePages;

        var myPartTableset = partClient.GetList("", 10, 1, out morePages);

       

        foreach (var partRec in myPartTableset.PartList)

        {

            Console.WriteLine(partRec.PartNum);

        }

        cf.Close();

    }

}