I am working on App that does below stuff.
-
Import records from excel file and bulk dump to the sql server database.
-
Then I run store procedure to preform some database level checks.
-
Then I grab records and inject to third party Using SOAP api.
-
I keep all the log for each step and save to database.
I have divided stuff into 3 different classes.
-
excel import - does validation of excel sheet, validate data, sql bulk insert to database.
-
CodeInjectionPros.cs - this is class that handle massaging database and prepare records that need to go to SoapApi. and in same class doing injection and update status to mydb of each record that inserted into soap api.
-
Loggger.cs - when i start excel import - i create object of this class. start adding line at every step where i needed. when whole process end. i mean saving to soap api completed , then i made one call to database to save all details I need to identify best practice to do that. Any help?
Let me know if i need to post code as well?
Aucun commentaire:
Enregistrer un commentaire