asp.net - Cant register vNext DI services using generics -


before moved aspnet5/vnext used simpleinjector. use simpleinjector register generic validators, using following:

services.addscoped(typeof(ivalidator<>), new list<assembly> { assembly.load("my.other.assembly") }); 

my classes defined in other assembly

public interface imyinterface : ivalidator<myobject> {}  public class myvalidator : imyinterface {    // methods here } 

is possible using standard vnext di system?

yes, possible. take here: http://dotnetliberty.com/index.php/2016/01/11/dependency-scanning-in-asp-net-5/


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -