StructId
Strongly-typed source-generated identifiers for .NET projects
All Skills in This Repository (1)
Pure Emerald Level IndicatorsFrequently Asked Questions
FAQPage SchemaHow to install StructId?▼
Run `npx skills add devlooped/StructId --all -g -y` in your terminal to install this skill globally.
What problem does StructId solve in .NET?▼
It replaces primitive ID types like Guid or int with strongly-typed readonly record structs, preventing accidental mixing of different entity IDs. All supporting code is source-generated, so there are no runtime dependencies.
Does StructId work with EF Core and Dapper?▼
Yes. When you reference EF Core or Dapper, value converters and type handlers are generated automatically, and a UseStructId() extension method registers them with no extra configuration.
Can I customize the generated ID code?▼
Yes. You can write your own file-scoped C# templates marked with [TStructId] to add interfaces or members to all matching struct IDs in your project.
Does StructId support Ulid identifiers?▼
Yes. Ulid works out of the box with EF Core and Dapper, and a parameterless New() factory method is generated using Ulid.NewUlid().
Related Repositories in Software Engineering
View All in Software Engineering→openclaw
Run a personal AI assistant across your devices and chat apps
superpowers
Gives coding agents a disciplined workflow from idea to merged code
react
AI agent skills for building, testing, and porting React core