c# - What to use instead of OnActionExecuting? ASP.NET MVC -
I have a few things that I do in the OnActionExecuting method in a base controller, that all my other controllers are closed.
I am doing a few simple things like adding a variable in the ViewData, which will "almost" need all my ideas, and some properties that use my controllers have to be reduced.
The thing is that I have bugs, this work is being done on those tasks which are not required. Is this a better place to work better? If I need something "heavy" now than what I have to do (i.e. DB access, etc ...)
Update: I'm more specifically referred to for a specific admin scenario where there are several actions that show only one view and some that take a form submission , Do some work, and redirect to any other action.
In this case, I want those actions that show ideas for using the work done on the onion extraction method. But those who accept form submissions, the work that is being done on the on-one acquisition, is not being used and adds unnecessary processing times for it.
Maybe I am not quite understanding it ... hope that now it is clear.
TIA!
If this action is easy to blacklist, compared to whitelist actions, this argument should not be executed. ), You can create the [SuppressWhateverLogic] attribute and apply the methods that you want to blacklist. To see this feature, then modify your on-process adoption () method (via ActionexSpitingContacts.Action Descriptor. ISDifain), and if the feature is present then log out of the argument.
If the whitelist is easy in action, then create a custom [MyLogic] filter by subclassing the logic out of the controller .Onactions () and ActionFilterAttribute. Add logic to MyLogicAttribute.OnActionExecuting (), then logic with those methods you want to associate with [MyLogic] logic to those methods.
Comments
Post a Comment