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
Post a Comment