Reference

Table Types (UDTT)

xtraq emits strongly typed records for user-defined table types used by your procedures.

What happens

  • Every UDTT referenced by generated procedures becomes a sealed record implementing ITableType.
  • Names are preserved (only minimal sanitising); no extra suffixes added.

Use in inputs

var contacts = new[]
{
    new UserContactTableType(1, "alice@example.com"),
    new UserContactTableType(2, "bob@example.com")
};

await db.CreateUserBatchAsync(new CreateUserBatchInput { Contacts = contacts }, ct);

Notes

  • UDTTs emit only when referenced; unused types are skipped.
  • Binders set SqlDbType.Structured automatically—no manual DataTable plumbing needed.
  • Custom binding is rarely required; reach for interceptors only in edge cases.