Wie füge ich ModelState mit Ninject als Parameter ein?

Im sehr neu in Ninject. Ich möchte einen Weg finden, den Modelstate eines Controllers an die Service-Schicht weiterzuleiten.

was ich gerade habe:

       private readonly IAccountService service; 

       public AccountController(ILanguageService ls, ISessionHelper sh)
        {
            this.service = new AccountService(new ModelStateWrapper(this.ModelState));
            this.languageService = ls;
            this.sessionHelper = sh;

        }

    public AccountService(IValidationDictionary validationDictionary)
    {
        this.validationDictionary = validationDictionary;
    }

wollen ich irgendwie zu bekommen:

       private readonly IAccountService service; 

       public AccountController(ILanguageService ls, ISessionHelper sh, IAccountService as)
        {
            this.service = as;
            this.languageService = ls;
            this.sessionHelper = sh;

        }

    public AccountService(IValidationDictionary validationDictionary)
    {
        this.validationDictionary = validationDictionary;
    }

Aber wie Sie sehen, kann AccountService niemals IValidationDictionary empfangen, da es nie vom AccountController als Parameter gesendet wurde.

Ist es möglich das zu erreichen? oder ist das nur eines der Dinge, mit denen ich leben muss?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage