Asp.Net MVC and Strategy pattern
问题 I have an MVC application that uses Entity Framework. I am using a repository, unit of work and unity as dependency injection. The problem I have is that I have different authentication types, and each type I want a different class, so I decided to use the Strategy pattern public interface IAuthStrategy { OperationResponse<AuthenticationMechanismDTO> GetAuthenticationMechanism(string userName); } public class AuthStrategy { readonly IAuthStrategy _authStrategy; public AuthStrategy