Which design pattern to use for pre-process process and post-process task

0 votes
I'm developing a data migration engine to move data from an older system to a newer one. It's broken down into three sections.

First, obtaining data from earlier tables.
Second. Prepare the request body for API post-processing processes to insert into new tables.
And finally. Which design pattern should I use in this case?

I was considering using the building pattern.

In the next phase, I'll make additional API calls to insert data into new tables. This has some structure to it. If an API request fails in the middle, all prior API calls must be redone. some sort of rewinding mechanism What is the best way for me to accomplish this?
Jun 8, 2022 in C# by pranav
• 2,580 points
294 views

1 answer to this question.

0 votes
You have pre-defined and precise steps to follow here. The template design pattern works effectively in this scenario.

The order of the calling steps is defined, and the responsibility for each step can be divided into different classes before being linked on the template management class.

Use this to learn more: https://refactoring.guru/design-patterns/template-method
answered Jun 9, 2022 by rajiv
• 1,620 points

Related Questions In C#

0 votes
1 answer

How and when to use ‘async’ and ‘await’

The compiler creates a state machine in ...READ MORE

answered Jul 4, 2022 in C# by krishna
• 2,820 points
82 views
0 votes
0 answers

When to use an interface instead of an abstract class and vice versa

This could be an OOP question in ...READ MORE

Jun 11, 2022 in C# by pranav
• 2,580 points
77 views
0 votes
1 answer

Awesome ASP.NET and C# tutorials for beginners

Go here https://dotnet.microsoft.com/en-us/learn/aspnet They have some nice tutorials ...READ MORE

answered Jun 17, 2022 in C# by jyoti
• 1,240 points
175 views
0 votes
1 answer

When to use abstract classes

When you need a class for inheritance ...READ MORE

answered Jun 17, 2022 in C# by jyoti
• 1,240 points
97 views
0 votes
0 answers

No connection could be made because the target machine actively refused it?

 I was doing HttpWebRequest to a WebService ...READ MORE

May 5, 2022 in Others by Kichu
• 19,040 points
1,666 views
0 votes
0 answers

A Generic error occurred in GDI+ in Bitmap.Save method

I am trying to copy a thumbnail ...READ MORE

May 23, 2022 in Others by Kichu
• 19,040 points
705 views
0 votes
1 answer

How to implement SOLID principles into an existing project

It will be a lengthy procedure. You ...READ MORE

answered Jun 14, 2022 in C# by krishna
• 2,820 points
95 views
0 votes
1 answer

Solid Principle examples

I am not a specialist like others, ...READ MORE

answered Jun 14, 2022 in C# by jyoti
• 1,240 points
145 views
0 votes
1 answer

What is the best C# to VB.net converter

Telerik has a solid SharpDevelop-based converter that ...READ MORE

answered May 30, 2022 in C# by rajiv
• 1,620 points
658 views
0 votes
1 answer

What are the correct version numbers for C#?

On Wikipedia, you may find the most ...READ MORE

answered May 31, 2022 in C# by rajiv
• 1,620 points
75 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP