using AutoMapper; using DutchTreat.Data.Entities; using DutchTreat.ViewModels; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DutchTreat.Data { public class DutchMappingProfile : Profile { public DutchMappingProfile() { CreateMap() .ForMember(o => o.OrderId, ex => ex.MapFrom(o => o.Id)) .ReverseMap(); CreateMap() .ReverseMap() .ForMember(m => m.Product, opt => opt.Ignore()); } } }