In the process of doing an upgrade from 2023.2.22 to 2025.2.14, and needing some detail around the difference of BufferCopy.Clone Vs BufferCopy.Copy in an Epicor Function.
After performing an upgrade conversion I have errors stating that ‘BufferCopy’ does not contain a definition for ‘Clone’ When I look at the intellisense I see
I don’t really understand why there is duplication there. That’s the first thing. The next thing I really wanted to ask for people who are much more skilled than myself, is there a difference and if so could you explain?
Oops when I was meaning differences I was meaning differences between BufferCopy.Clone and .Copy. Support person hate post right there… Two questions in one… Sorry.
CallService<UD100SvcContract>((svc) =>
{
var ds = svc.GetBySysRowID(Guid.Parse("2d766025-cdff-44de-b79e-1b53670b0458"));
var dsRow = ds.UD100.First();
var dsCopy = new UD100Tableset();
var dsRowCopy = BufferCopy.Copy(dsRow);
dsCopy.UD100.Add(dsRowCopy);
});
There’s also this fun copy if you want to copy an entire tableset:
CallService<UD100SvcContract>((svc) =>
{
var ds = svc.GetBySysRowID(Guid.Parse("2d766025-cdff-44de-b79e-1b53670b0458"));
var dsCopy = new UD100Tableset();
DataCopy.CopyTableset(ds, dsCopy);
});
Probably because it did something different than the .net DataSet.Clone() method. The standard method copies the DataSet object structure, but not the data itself.