0

I realy like concept of Aspect Oriented Programing and I would like to use it in my aplication for few services. Application is Net MVC 4. I know about filters, but i would like to use AOP in other classes- outside of controller. I can't find any resources about this and all i get is filetrs wchich are limited.

Can anyoe point me to some resources how to integrate AOP in MVC4? Is there any framework easy to integrate with that?

bunny1985
  • 762
  • 6
  • 21
  • Unity framework should be good enough – AD.Net May 30 '14 at 16:36
  • possible duplicate of [Aspect Oriented Programing (AOP) solutions for C# (.Net) and their features](http://stackoverflow.com/questions/4999144/aspect-oriented-programing-aop-solutions-for-c-sharp-net-and-their-features) – ale May 30 '14 at 16:52
  • As I mentioned there is a difference between plain c# appliacatins and ASP.Net. According to support using post# is not reccomended in this case. Don't know what others solutiions are available. – bunny1985 May 30 '14 at 17:02

1 Answers1

1

There is some frameworks to use AOP in .Net, but probably most easy to integrate solution should be PostSharp, you can also take a look into Castle Dynamic Proxy, but use a completely different approach:

ale
  • 10,012
  • 5
  • 40
  • 49
  • http://support.sharpcrafters.com/discussions/questions/756-post-sharp-support-for-aspnet-mvc-application According to this POstSharp is not reccomended. – bunny1985 May 30 '14 at 16:54
  • @user1208630 - You misunderstood that question. They're saying that Web Site projects should not use PostSharp, Web Site projects are created with File->New->Web Site. PostSharp can be used with Web Application projects, which are created with File->New->Project. MVC sites are Web Application projects, and thus are perfectly fine to use with PostSharp. The answer refers to Asp.NET, while the question refers to MVC. The answer does not directly answer the question asked, but is instead answering whether the article he refers to is still valid, not whether MVC can be used. – Erik Funkenbusch May 30 '14 at 18:00