using AutoMapper;
using Qusion.Cms.Media;

namespace Qusion.WebApp.Areas.cms.Models.Libraries
{
    public class LibraryProfile : Profile
    {
        protected override void Configure()
        {
            Mapper.CreateMap<Library, LibraryListModel>();
            Mapper.CreateMap<Library, LibraryModel>();

            Mapper.CreateMap<Library, LibraryModel>()
               .ForMember(x => x.Radnici, o => o.MapFrom(x => x.Radnici.Split(',')));
        }
    }
}