jamescrosswell / CommandRouting

A DNX alternative to MVC that lets you route directly to CQRS style command handlers.
MIT License
3 stars 3 forks source link

I want to be able to automatically register context classes with the service provider using attributes #18

Open jamescrosswell opened 8 years ago

jamescrosswell commented 8 years ago

Contextual classes (like JumpContext in the Sample application) need to be instantiated with Scoped lifetimes by the service provider... which means they have to be registered first. It's annoying having to register each one manually/individually in the ConfigureServices method. It would be nice to be able to decorate a class with a [RouteContextAttribute] or something and have these discovered/registered automatically when we call AddCommandRouting().