2

I would like to use 'WEB API' action filter attributes over 'Class Library' class methods. Is that possible? or Any advice?

1 Answer 1

1

Not without more trouble than its worth. Action filters are a feature of Web Api, so unless you are talking about putting Web Api controllers into your own library or using filters from your library within Web Api controllers, you won't be able to take advantage of them directly.

A potential solution could be to use a proxy pattern or decorator pattern to handle cross-cutting concerns for your library. Have a look at Aspect-Oriented Programming : Aspect-Oriented Programming with the RealProxy Class for details.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.