session-companion/SessionCompanion/SessionCompanion.Services/Profiles/ShopkeeperItemsProfile.cs

26 lines
813 B
C#
Raw Normal View History

2021-01-20 18:54:56 +01:00
using AutoMapper;
using SessionCompanion.Database.Tables;
using SessionCompanion.ViewModels.ShopkeeperItemsViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SessionCompanion.Services.Profiles
{
2021-01-22 08:00:03 +01:00
using SessionCompanion.ViewModels.ShopkeeperItemViewModels;
2021-01-20 18:54:56 +01:00
public class ShopkeeperItemsProfile : Profile
{
public ShopkeeperItemsProfile()
{
CreateMap<ShopkeeperItemViewModel, ShopkeeperItem>().ReverseMap();
2021-01-22 08:00:03 +01:00
CreateMap<ShopkeeperItemDetailsViewModel, ShopkeeperItem>()
.ForMember(vm => vm.Armor, conf => conf.MapFrom(item => item.Armor))
.ForMember(vm => vm.Weapon, conf => conf.MapFrom(item => item.Weapon)).ReverseMap();
2021-01-20 18:54:56 +01:00
}
}
}