Ninject bind to concrete class and calling class's method on binding, UserManger class , Configure method

41 views
Skip to first unread message

spaceradar...@gmail.com

unread,
Dec 15, 2017, 5:16:02 AM12/15/17
to ninject

THe snippet of code below is used in structuremap.

It allow binding to the concrete UserManager class directly and hten calling the Configuring method on the class.

Is there and equivalent in Ninject and if so could someone show me the code?

ForConcreteType()

.Configure

.SetProperty(userManager => userManager.PasswordValidator = new PasswordValidator { RequiredLength = 6 }) .SetProperty(userManager => userManager.UserValidator = new UserValidator(userManager));

Reply all
Reply to author
Forward
0 new messages