Note that there are some explanatory texts on larger screens.

plurals
  1. PODI error when calling an assembly from an injected assembly
    primarykey
    data
    text
    <p>so i'm having a few problems with dependency injection.. i get the following error:</p> <blockquote> <p>Error activating IDocumentReadRepository No matching bindings are available, and the type is not self-bindable. Activation path: 3) Injection of dependency IDocumentReadRepository into parameter readRepository of constructor of type ReadOrchestrator 2) Injection of dependency IReadOrchestrator into parameter</p> </blockquote> <p>so i'm injecting my readOrchestrator into my MVC3 app which is fine.. but the problem arises when in my readOrchestrator i call a method in my IDocumentReadRepository.</p> <p>my ReadOrchestrator looks like:</p> <pre><code>public class ReadOrchestrator : IReadOrchestrator { private readonly IDocumentReadRepository _readRepository; public ReadOrchestrator(IDocumentReadRepository readRepository) { _readRepository = readRepository; } public UserFeed GetUserFeed(string userName, int pageNumber, int pageSize) { var feed = _readRepository.Query&lt;UserFeed&gt;(x =&gt; x.UserName == (string)userName .Page(pageNumber, pageSize)); return feed; } } public class DocumentReadRepository : IDocumentReadRepository { readonly IDocumentStore _documentStore; public DocumentReadRepository(IDocumentStore documentStore) { _documentStore = documentStore; } ... } </code></pre> <p>Should i be using DI in this situation? if so, how/where should i do the binding for the IDocumentReadRepository? or should i just be creating a new instance of it each time i call my ReadOrchestrator?</p> <p>thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload