asp.net mvc - Pass method dependency in MVC controller action Method -


how can pass dependency using unity, mvc controller action method ?

for example, if have post action method dependency of itestrepository type, injected through method injection ? not want testrepository instantiated withing action method.

    public actionresult savedata(itestrepository irepoinstance)     {         var save = irepoinstance.savedata();         return view();     } 


Comments

Popular posts from this blog

javascript - Complete OpenIDConnect auth when requesting via Ajax -

c# - Replace text in MailItem Body -

apache - PHP Soap issue while content length is larger -