https://github.com/iikuzmychov/superstrong.types
Strong types for .NET — define once, use everywhere!
https://github.com/iikuzmychov/superstrong.types
code-generators ddd domain-driven-design primitive-obsession source-generators strong-types strongly-typed strongly-typed-id super-strong value-objects
Last synced: 3 days ago
JSON representation
Strong types for .NET — define once, use everywhere!
- Host: GitHub
- URL: https://github.com/iikuzmychov/superstrong.types
- Owner: iikuzmychov
- License: mit
- Created: 2026-06-03T14:27:06.000Z (20 days ago)
- Default Branch: master
- Last Pushed: 2026-06-20T00:57:48.000Z (4 days ago)
- Last Synced: 2026-06-20T01:04:05.474Z (4 days ago)
- Topics: code-generators, ddd, domain-driven-design, primitive-obsession, source-generators, strong-types, strongly-typed, strongly-typed-id, super-strong, value-objects
- Language: C#
- Homepage: https://superstrong.dev
- Size: 559 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README

# SuperStrong.Types
**Strong types for .NET — define once, use everywhere!**
[](https://www.nuget.org/packages/SuperStrong.Types/)
[](https://superstrong.dev/)
[](https://github.com/iikuzmychov/SuperStrong.Types/blob/master/LICENSE.md)
> [!WARNING]
> SuperStrong.Types is in beta: the API and features are not in final shape yet.
## What does this library do?
You write this:
```csharp
[StrongType]
public sealed partial class UserId;
```
You get auto-generated:
- wrapping: `_value`, `From(...)`, `TryFrom(...)`, `AsPrimitive()`, `IStrongType<,>`
- equality: `==`, `!=`, `Equals(...)`, `GetHashCode()`, `IEquatable<>`, `IEqualityOperators<,,>`
- comparison: `<`, `<=`, `>`, `>=`, `IComparable<>`, `IComparisonOperators<,,>`
- formatting: `ToString(...)`, `IFormattable`, `ISpanFormattable`, `IUtf8SpanFormattable`
- parsing: `IParsable<>`, `ISpanParsable<>`, `IUtf8SpanParsable<>`
- conversion: `IConvertible`, `TypeConverter`, `JsonConverter`
You can easily integrate it with:
- ASP.NET Core
- EF Core
- Hot Chocolate
- Newtonsoft.Json
and more coming soon: OpenAPI, Dapper, MessagePack, ...
## How to install?
Install the package from [NuGet](https://www.nuget.org/packages/SuperStrong.Types):
```sh
dotnet add package SuperStrong.Types --preview
```
This library targets **.NET 10**, so your project should target .NET 10 or higher to be compatible with SuperStrong.Types.
## Why use this library?
Fighting [primitive obsession](https://superstrong.dev/preface/primitive-obsession) usually requires a lot of boilerplate.
SuperStrong.Types generates that boilerplate for you, so you can focus on modelling your domain instead of writing repetitive code.
## What's next?
- Find out more in the [tutorial](https://superstrong.dev/tutorial/getting-started)
- Learn about strong type [validation](https://superstrong.dev/tutorial/validation) and [customization](https://superstrong.dev/tutorial/customization)
- Take a look at the available [integrations](https://superstrong.dev/integrations/ef-core)
- Compare SuperStrong.Types with [alternatives](https://superstrong.dev/alternatives/strongly-typed-id)
- Do 10 push-ups, 10 pull-ups, and 10 squats
## Acknowledgements
SuperStrong.Types is inspired by two excellent libraries:
- [StronglyTypedId](https://github.com/andrewlock/StronglyTypedId) by Andrew Lock
- [Vogen](https://github.com/SteveDunn/Vogen) by Steve Dunn
Thanks to both authors for the ideas and groundwork.