Hi,
Getting Error while trying to apply filter at controller level
MyAuthenticationFilter is not an attribute class
EmpRepository is a type, which is not valid in the given context
I have one filter
public class MyAuthenticationFilter : IAuthenticationFilter
{
EmpRepository _empRepository = new EmpRepository ();
public MyAuthenticationFilter(EmpRepository empRepository)
{
_empRepository =empRepository;
}
public void OnAuthenticationChallenge(AuthenticationChallengeContext filterContext)
{
}
}
and one controller
[MyAuthenticationFilter((EmpRepository )]
public class EmployeesController : Controller
{
I am trying to apply filter at controller level getting error at below line
[MyAuthenticationFilter((EmpRepository )]