Dotnetcore Questions
Dotnetcore Questions
Dependency injection is the design pattern that allows us to inject the dependency into the class from the outer world
rather than creating with in class. This will help us to create loosely coupled applications so that it has provided greater
maintainability, testability, and also reusability.
Q: Filters in MVC ?
In ASP.NET MVC, a user request is routed to the appropriate controller and action method. If you want to execute some
logic before or after an action method executes. ASP.NET MVC provides filters for this purpose.
We can set filters at application level, controller level & action method end.
Action filters Performs some operation before and after an action IActionFilter
method executes.
Result filters Performs some operation before or after the [OutputCache] IResultFilter
execution of the view.