Skip to content

Utility types

TypeScript-style utility types are available in the separate ZibStack.NET.Core package:

using ZibStack.NET.Core;
[PartialFrom(typeof(Player))] // all properties optional + ApplyTo()
public partial record PartialPlayer;
[PickFrom(typeof(Player), "Name", "Level")] // whitelist
public partial record PlayerSummary;
[OmitFrom(typeof(Player), "Id", "CreatedAt")] // blacklist
public partial record PlayerWithoutMeta;
[IntersectFrom(typeof(Player))] // combine multiple types
[IntersectFrom(typeof(Address))]
public partial record PlayerWithAddress;

See the ZibStack.NET.Core documentation for full documentation.