using System; using System.Collections.Generic; using System.Text; namespace SessionCompanion.Services.Profiles { using AutoMapper; using SessionCompanion.Database.Tables; using SessionCompanion.ViewModels.CharacterOtherEquipmentViewModels; public class CharacterOtherEquipmentsProfile : Profile { public CharacterOtherEquipmentsProfile() { CreateMap().ReverseMap(); CreateMap() .ForMember(vm => vm.Name, conf => conf.MapFrom(otherEquipment => otherEquipment.OtherEquipment.Name.ToString())) .ForMember( vm => vm.Description, conf => conf.MapFrom(otherEquipment => otherEquipment.OtherEquipment.Description.ToString())) .ForMember( vm => vm.Cost, conf => conf.MapFrom(otherEquipment => otherEquipment.OtherEquipment.Cost)) .ForMember( vm => vm.CurrencyType, conf => conf.MapFrom(otherEquipment => otherEquipment.OtherEquipment.CurrencyType)).ReverseMap(); } } }