serialization - Clone LINQ To SQL object Extension Method throws object dispose exception -
I have this extension method to clone the SQL objects with my linux:
Public stable t clone object graff & lieutenant; T & gt; (This is T. O.B.J.) where T: class {var serializer = new data-controller serializer (typef (t), empty, maxwell, false, true, empty); (Serializer.WriteObject (ms, obj) using (var ms = new System.IO.MemoryStream ()); Ms.osition = 0; Return (T) Serializer Readobject (ms); }}
But when I take objects, in which all the references are not loaded, whereas kyaving with DataLoadOptions sometimes throws an object discarded exception, but the thing is that I For the reference, not loaded (tap)
For example, I have many reference customers and I need to move the address reference EntityRef & lt;> and I will load anything Does not but when i go to the object The do it except me customer forced to load all Antaisetsat & lt;> With reference to the object, which can be very high and apps slowing down the speed.
Any suggestions?
Comments
Post a Comment