Chapter 13: Getting Started with Object Mappers

In this chapter, we'll explore object mapping. As we saw in the previous chapter, working with layers often leads to copying models from one layer to another. Object mappers solve that problem. We will first take a look at manually implementing an object mapper. Then, we'll improve our design. Finally, I will introduce you to an open source tool that helps us generate business value instead of writing mapping code.

The following topics will be covered in this chapter:

  • Overview of object mapping
  • Implementing an object mapper, and exploring a few alternatives
  • Using the Service Locator pattern to create a service in front of our mappers
  • Using AutoMapper to map an object to another, replacing our ...

Get An Atypical ASP.NET Core 5 Design Patterns Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.