I opened ticket last week ticket is Asp.Net MVC and Strategy pattern in that ticket Brendan solution worked but once i implemented one more class and implemented IAuthStrategy on that class and registered in unity container only last register class code is executing and i want to execute each on certain condition, my new class code is
public class WindowsMechanism : IAuthStrategy
{
private IInstitutionRepository _institutionRepository;
public UserNamePasswordMechanism(IInstitutionRepository institutionRepository)
{
this._institutionRepository = institutionRepository;
}
public OperationResponse<AuthenticationMechanismDTO> GetAuthenticationMechanism(string userName)
{
throw new NotImplementedException();
}
}
and unity registration is this which is in unityConfig.cs
container.RegisterType<IAuthStrategy, UserNamePasswordMechanism>();
container.RegisterType<IAuthStrategy, WindowsAuthMechanism>();
i am not able to fix this issue any help will be highly appreciated.