Smart Saver - Generic Save routine

Smart Saver - Generic Save routine

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


Vinodonly posted on Wednesday, July 04, 2007

Attached file can be added in your code to provide a generic save routine for saving csla business objects.

Code is similar to sample application provided with CSLA but can be used for any object. So instead of writing all the try catch blocks, call for saving object can be reduced to one line :-

 

SaveRecord(Of Order)(mOrder, MainBindingSource,  ChildBindingSource1, ChildBindingSource2 )

 

Detailed comments are given in code. Pls try out and advise your comments/feedback.

DocJames replied on Thursday, July 05, 2007

Has anyone converted the code to C#? VB.net is not my best language :(

Thanks,

Jimmy

Vinodonly replied on Thursday, July 05, 2007

there are lot of converters avl on net, you can also use sharpdevelop to convert it

http://www.icsharpcode.com/OpenSource/SD/Default.aspx

 

Copyright (c) Marimer LLC