Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

nuget.org : diassistant

Initial releaseAssistant that will bind all your services, adapters etc. with a single command, while still using any IoC you may wish, or sticking to the default MVC implementation. In your Startup.cs file invoke BindDependencies() on IServicesCollection and pass in required parameters. Every Interface should inherit from IInjectable, and every implementation needs to have [Transient], [Scoped], or [Singleton] attribute on top. Each of those parameters also takes environment input, which allows you to simply bind mocked implementations for running tests for example. If you want to use an IoC container, create an implementation of IInjector interface and pass it in to the BindDependencies extension method called upon IServiceCollection via generic parameter. I would suggest following 'Composition Root' pattern, it will both save you some headache and make all of this seem even easier than it already is.

Registry - Homepage - JSON
purl: pkg:nuget/diassistant
Keywords: DI, Dependeny, injection, MVC, Mocking, Mock
License: MIT
Latest release: almost 7 years ago
First release: almost 7 years ago
Downloads: 3,523 total
Stars: 0 on GitLab.com
Forks: 0 on GitLab.com
See more repository details: repos.ecosyste.ms
Last synced: 13 days ago

    Loading...
    Readme
    Loading...