using System;
using Faithlife.Reflection;
class Program
{
static void Main()
var widget = CreateWithId<Widget>("xyzzy");
Console.WriteLine(widget.Id);
}
static T CreateWithId<T>(string id) => DtoInfo.GetInfo<T>().CreateNew(("Id", id));
readonly struct Widget
public Widget(string id) => Id = id;
public string Id { get; }