Posts

Showing posts with the label Cross cutting concerns

Filters in MVC5?

Filters: Filters in mvc are a way to implement cross cutting concerns which means Functionaity that is used aross the application based on different layers. These fnctionality includes logging, exception handling, cacheing, Authorization, Authentication etc. These function are required to kept at single place so as to mkae changes easier.Advavntage that filters provide as they use common logic to implemented using cross cutting concerns that can be applied on different controllers and action methods. There are generally two types of filters that are Global filters and Controller filters.  We can create a Global filter by creating a class nad registering it as a global filter  <code> public class DemoGlobalFilterAttribute : ActionFilterAttribute    {        public override void OnActionExecuting(ActionExecutingContext context)        {            base.OnActionExecuti...