using System.Collections.Generic;
using Nelibur.ObjectMapper;
public static void Main()
var demo = new List<Demo> {
ListStuff = [new() { Text = "list 1 elem 1" }, new() { Text = "list 1 elem 2" }]
ListStuff = [new() { Text = "list 2 elem 1" }, new() { Text = "list 2 elem 2" }]
var mapped = demo.MapTo<List<DemoAlt>>();
foreach(var ie in e.ListStuff)
Console.WriteLine(ie.Text);
public string Foo { get; set; }
public int Bar { get; set; }
public bool Baz { get; set; }
public List<ListProp> ListStuff { get; set; }
public string Foo { get; set; }
public int Bar { get; set; }
public bool Baz { get; set; }
public List<ListProp> ListStuff { get; set; }
public string Text { get; set; }
public static class LinqExtensions
public static TTarget MapTo<TTarget>(this object source)
return TinyMapper.Map<TTarget>(source);
TinyMapper.Bind(source.GetType(), typeof(TTarget));
return TinyMapper.Map<TTarget>(source);