implementing Configuring AutoMapper for Nested Objects in C# 9
I'm refactoring my project and I'm running into issues while trying to configure AutoMapper for mapping nested objects in my C# 9 application. I have a source class `Order` that contains a nested class `Customer`, and I want to map these classes to a destination class `OrderDto` which also contains a nested class `CustomerDto`. Here are my classes: ```csharp public class Order { public int Id { get; set; } public decimal Total { get; set; } public Customer Customer { get; set; } } public class Customer { public string Name { get; set; } public string Email { get; set; } } public class OrderDto { public int Id { get; set; } public decimal Total { get; set; } public CustomerDto Customer { get; set; } } public class CustomerDto { public string Name { get; set; } } ``` I've set up my mapping configuration like this: ```csharp var config = new MapperConfiguration(cfg => { cfg.CreateMap<Order, OrderDto>(); cfg.CreateMap<Customer, CustomerDto>(); }); var mapper = config.CreateMapper(); ``` When I try to map an `Order` object to `OrderDto`, I get a `AutoMapperMappingException` with the message: ``` Missing type map configuration or unsupported mapping. ``` I verified that both the `Order` and `Customer` classes are being recognized correctly, yet the mapping fails when it tries to convert the nested `Customer` property. I've already tried ensuring that the properties are public and that the naming matches, but nothing seems to work. Is there something specific I need to configure for nested mappings in AutoMapper? Am I missing a configuration step or perhaps a best practice that I should be following with regards to nested objects in AutoMapper? Any feedback is welcome!