Third Party .DLL to Add/Update some tables.

Third Party .DLL to Add/Update some tables.

Old forum URL: forums.lhotka.net/forums/t/10999.aspx


Pavel posted on Tuesday, December 20, 2011

Hi,

I must use some 3rd party .DLL to Add/Update some tables.

The actual procedure is to create Company object using this library and to call method Add or Update providing required properties values.

I tried to create Company object as a property of CSLA object and it did not work as it cannot be Serialized.

So, I create a Public method SaveCompany inside CSLA object  to create and use Company object to do Add/Update.

It's not a way how we handle CSLA Data Portal method to handle data.

Does anybody have a better idea how to do this?

Thanks,

Pavel

 

JonnyBee replied on Tuesday, December 20, 2011

You should online use the 3rd party classes inside the DataPortal_XYZ methods.

Map values from your <bo> into instances of the 3rd party object and call methods on that.

Pavel replied on Tuesday, December 20, 2011

JonnyBee

You should online use the 3rd party classes inside the DataPortal_XYZ methods.

Map values from your <bo> into instances of the 3rd party object and call methods on that.

 

Thanks,

 

What about Silverlight application?

I ask this because we are about to migrate to Silverlight and I am still in a process of learning.

I can assume that 3rd party .dll would be on server side and I have to call it from client DataPortal_XYZ method.

So, this method is going to provide mapping from CSLA object and actual Add/Update would be done on server using this .dll.

Is that a right scenario?

 

 

 

JonnyBee replied on Tuesday, December 20, 2011

Yes, that's the scenario. 

Pavel replied on Tuesday, December 20, 2011

Thanks a lot,

Pavel replied on Monday, February 06, 2012

Back to my question....after some testing it turned out that CreateCompanyObject method is a very time consuming.

It's absolutely impossible to call it every time we need to Update/Add data to database.

The solution is to create this object during login operation and keep it alive for calling methods Update or Add of this Company object as it required from DataPortal_XYZ methods.

What would be the best approach for SL and WinForm applications to create this object?

Thanks,

Copyright (c) Marimer LLC