21 lines
600 B
C#
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()));
|
|
}
|
|
}
|
|
}
|