Then we add configuration for AutoMapper into CustomDtoMapper.cs like below:

configuration.CreateMap<CreatePersonInput, Person>();

CreatePersonInput is mapped to Person entity (comment out
related line in CustomDtoMapper.cs and we will use mapping below).
All properties are decorated with data annotation attributes
to provide automatic
validation.
Notice that we use same consts defined in PersonConsts.cs in
.Core.Shared project for MaxLength properties. After adding this
class, you can remove consts from Person entity and use this new
consts class.

A Person entity is created by mapping given input, then inserted to
database. We used async/await pattern here. All methods in ASP.NET
Zero startup project is async. It's advised to use async/await
wherever possible.