Categories: ASP.NETASP.NET Core

Aspect-oriented programming in .NET Core

Step 9. Create the new controller file under the controllers folder. This filename sets the “ActionFilterController” file, which adds the CRUD methods.

Fig 8 Create the empty controller file

Create a new folder under Views. This folder name sets “ActionFilter.” Create View files under the ActionFilter folder, such as Create, Details, Delete, Edit, and Index.

Fig 9 Solution Explorer

Step 10. Add the action filter in the controller file. You can assign the “IActionResult” method or all of the “IActionResult” methods.

Fig 10 ActionFilter Controller file source code

Note: If you want to see the complete source code, please go to my Github – Enterprise_MVC_WebApp. My Github link puts on my profile page.

Page: 1 2 3 4 5

davidsky69

View Comments

Recent Posts

Behavioral Patterns – Mediator

Mediator – It can let the program reduces chaotic dependencies between objects. This pattern can restrict the…

5 years ago

Behavioral Patterns – Iterator

Iterator – It let the programs traverse all of the collection elements without their underlying representation and…

5 years ago

Behavioral Patterns – Interpreter

Interpreter –  It provides to evaluate the language grammar and description. This idea bases on having…

5 years ago

Behavioral Patterns – Command

Command – It turns the client’s requests into a stand-alone object which contains all information about the…

5 years ago

Behavioral Patterns – Chain of Responsibility

Chain of Responsibility – It lets the program passes the client requests along a chain of handlers.…

5 years ago

Design Patterns – Behavioral Patterns

The behavioral patterns are about identifying the common communication patterns between objects and bring about…

5 years ago