This is a simple question but kind of difficult to explain. I usually have various Fill methods on each of my BO's. I often find that the custom methods that I write for the BO's, like for verifying data, could be much simpler if I just used one of the Fill methods and processed the records that are returned with the BO's MoveFirst() and MoveNext() methods, the problem is that if I use a Fill method the current datatable would be overwritten. I would imaging that the proper thing to do would be to have the method be completely self contained and not have a requirement that the currentdatatable be filled with the record that needs to be deleted. How should this situation be handled, I was thinking of creating a datatable and coping the BO's current datatable then when the process is done restoreing the current datatable from the local copy. Or the other solution would be to create a local BO and call its Fill method and process that way. I was just wondering what kind of overhead each method involves and how you are recommending it be handled.Here is a simple example of a current situation. I have coded some delete rules in the Before_Delete event of the BO. Calling the DeleteByPrimaryKey does not fire the Before_Delete event, (makes sense, there is no datatable) so what I figured I would do is call the FillByPrimaryKey, call DeleteCurrentRow and process it that way. By calling the FillByPrimaryKey I am replacing the CurrentDataTable so I used a temp datatable object and restored the currentdatatable once processing was complete.
Help... am I just still not fully understanding .Net and how things need to be done?