Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 987 Bytes

README.md

File metadata and controls

33 lines (24 loc) · 987 Bytes
logo with the letters N and P

tests workflow codecov

No Primitives: Value Objects the easy way!

Forget the boilerplate nonsense!

It holds your hand from declaring your Value Object to using it in a database, to serializing it to JSON and beyond. No boilerplate code, just a simple Attribute!

Install

dotnet add package NoPrimitives

Usage

[ValueObject<Guid>]
partial record UserId;

...

app.MapGet("/v1/users/{{id}}", async (UserId id) => {
    // use your value object and enjoy it being always valid!
})

Test Coverage Graph

codecov