Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8885227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:15:24+00:00 2026-06-14T21:15:24+00:00

So I have been reading some comments on StackOverlow, saying that you shouldn’t put

  • 0

So I have been reading some comments on StackOverlow, saying that you shouldn’t put business logic in a custom ActionFilterAttribute because it is considered meta data.

For example accessing a repository and doing some checks, and processing accordingly within your custom attribute (bad).

Firstly I am not sure how much I agree with this because alot of the framework Filters (Authenticate) etc, do business logic – the main difference it is mostly within the scope of the controller only i.e. only accessing controller values, route data etc.

So my question is, when you do need to use an ActionFilter to flag individual Actions for additional logic/processing, where do you put the logic?

Thanks for the input/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:15:26+00:00Added an answer on June 14, 2026 at 9:15 pm

    There is nothing wrong with using actionfilters to do some business logic. Typically this is how you implement those cross cutting concerns like logging, security (as you pointed out).

    Their purpose is all in their name. Filters for your Actions. Either incoming actions, or outgoing modifications to your data to be output.

    What you need to beware is putting behaviors that modify business data and persist the changes in actionfilters. These kinds of things are counter intuitive to the next developer to see your code. They don’t filter anything, they change the state of the overall system, which is what Actions(Commands) are for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As titled, how can I do that? I have been reading some Silverlight/WPF animation
I have been doing some reading, and I see that I can use getch()
I am a newbie on optimization. I have been reading some reference on how
I have been reading over some code lately and came across some lines such
I have been reading a lot on design patterns lately and some of them
I have been reading about Scala for a while and even wrote some small
I have been reading up on the changes that .NET4.5 will bring, and on
I have been reading some django tutorial and it seems like all the view
Hi I have been reading some lecture notes and I cant work out why
I have been reading some of the perl513*delta files and I have seen some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.