].FirstName + nameDto12[].LastName);
Console.WriteLine();
//Console.ReadKey();
//emitMapper error
//List<NameDto>
nameDto20 =
EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper<IDataReader,
List<NameDto>>().Map(dt.CreateDataReader());
");
Console.WriteLine(name15.FirstName);
Console.WriteLine();
Console.ReadKey();
}
}
public class Store
{
public Name Name { get; set; }
public int Age { get; set; }
}
public class Name
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
public class StoreDto
{
public NameDto Name { get; set; }
public int Age { get; set; }
}
public class NameDto
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string AllName { get; set; }
}
public class FlattenName
{
public string NameFirstname { get; set; }
public string NameLastName { get; set; }
}
public class NameConverter : TypeConverter<Name, NameDto>
{
protected override NameDto ConvertCore(Name source)
{
return new NameDto() { AllName = source.FirstName + source.LastName };
}
}
public class NameResolver : ValueResolver<Name, NameDto>
{
protected override NameDto ResolveCore(Name source)
{
return new NameDto() { FirstName = source.FirstName, LastName = source.LastName };
}
}
public class NameFormatter : ValueFormatter<NameDto>
{
protected override string FormatValueCore(NameDto name)
{
return name.FirstName + name.LastName;
}
}
public class StringFormatter : ValueFormatter<string>
{
protected override string FormatValueCore(string name)
{
return name + "-";
}
}
}