MavierTechCompany / CookieBook-WebAPI

A WebAPI for Cookie Book project.
Other
1 stars 0 forks source link

Introduce AutoMapper to the project #23

Closed MadTiger2409 closed 5 years ago

MadTiger2409 commented 5 years ago

Problem

Currently data flow from DB do the user looks like this: DB Model -> 'Data Shaping Object'

This creates problems with looping references (it's kind of solved, but not 100%).

Solution

The solution is to introduce AutoMapper and DTO object.

This will change data flow and it will looks like this: DB Model -> 'DTO Object' -> 'Data Shaping Object'

So for example whenever you need to get a set of recipes, every recipe will include user id but not full user object.

MadTiger2409 commented 5 years ago

Can merge

MadTiger2409 commented 5 years ago

Ok