session-companion/SessionCompanion/SessionCompanion.Services/Profiles/BiographyProfile.cs
Łukasz Góreczny e6a6ac290a Dodanie profili
2020-12-06 11:21:33 +01:00

21 lines
600 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using SessionCompanion.Database.Tables;
using SessionCompanion.ViewModels.BiographyViewModels;
namespace SessionCompanion.Services.Profiles
{
public class BiographyProfile : Profile
{
public BiographyProfile()
{
CreateMap<BiographyViewModel, Biography>();
CreateMap<Biography, BiographyViewModel>()
.ForMember(vm => vm.Languages, conf => conf.MapFrom(bio => bio.Languages.Split(new char[] { ',' }).ToList()));
}
}
}