Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What design pattern will fit to convert data table to list of domain objects?

I have a service that calls database to retrieve data; this service will return data as data table. Now I want to implement design pattern that fit in between my client and the service so it will convert these data tables to list of domain object. Which design pattern will fit here as a wrapper for this service by exposing data table as list of objects?

like image 561
Abdullah BaMusa Avatar asked Jan 20 '26 17:01

Abdullah BaMusa


1 Answers

I guess you need adapter pattern.

like image 170
Ankur Avatar answered Jan 23 '26 05:01

Ankur