Getting Started
Quickstart
Create a new project
If you already have a .NET project you can skip this step.
Add packages
Add the ImmediatePlatform packages as dependencies to your project.
Register with DI
Register Immediate.Handlers services with dependency injection.
Create your first handler
Create your first handler that will accept a User ID and return a user.
📝 Note: In this example, to keep things simple, we will fake the user. In a real application, you would likely load a user from a database.
You can now call the handler like so:
(Optional) Turn your handler into an endpoint
If you have opted to install Immediate.Apis you can easily turn your handler into an API endpoint.
First modify your
Program.cs
to register the Immediate.Apis endpoints, like so:Then modify the handler like so:
Keep reading the docs to learn about addressing cross-cutting concerns like logging with behaviors, validating the queries and commands with Immediate.Validations and more! You can also check out our cookbook for complete, ready-made examples.