26 ms·
This looks wonderful and exactly how I'd like to think about such things. Do you generally end up using your db models as the domain models for your application
by macrael 7y ago
This looks wonderful and exactly how I'd like to think about such things. Do you generally end up using your db models as the domain models for your application? Or do you have a separate set of models for that, and if so how do you translate between them?
- conroy 7y agoIn practice, I use the database models as the domain models for an application. However, if I need to expose the models to the outside world via a service, I create a separate set of models. I then define a set of mapping functions between the two.