using AutoMapper;
using WebVentaCoche.Models;
using WebVentaCoche.ViewModels;

namespace WebVentaCoche.Helpers
{
    public class MappingProfile : Profile
    {
        public MappingProfile()
        {
            CreateMap<User, AccountDetailsViewModel>()
                .ForMember(dest => dest.Addresses,
                           opt => opt.MapFrom(src => src.Addresses));

            CreateMap<Address, AddressViewModel>();
        }
    }
}
