using System.Collections;
using System.Collections.Generic;
using System.Globalization;
public DateTime[] ProductionDates { get; set; }
public string PeriodStart { get; set; }
public string PeriodEnd { get; set; }
public static void Test()
var config = new MapperConfiguration(
cfg.CreateMap<HouseDto, House>()
.ForMember(d => d.ProductionDates, e => e.MapFrom(s => s.PeriodStart))
.ForMember(d => d.ProductionDates, e => e.MapFrom(s => s.PeriodEnd));
var mapper = config.CreateMapper();
PeriodStart = "2008-09-22",
var dto = mapper.Map<HouseDto>(house);
public static void Main()
Console.WriteLine("Environment version: {0} ({1})", System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription , Environment.Version);
Console.WriteLine("{0} version: {1}", typeof(MapperConfiguration).Assembly.GetName().Name, typeof(MapperConfiguration).Assembly.FullName);
Console.WriteLine("Failed with unhandled exception: ");