Waht是MVC中的使用过滤器 [英] Waht is the use filter in MVC

查看:49
本文介绍了Waht是MVC中的使用过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是MVC的初学者,我也在使用angularjs web api但是到现在为止我还没有使用过滤器MVC所以我想知道MVC中的Filter



我尝试了什么:



我试过谷歌并实现逻辑但不确定Filter的确切逻辑在MVC中

解决方案

参考 - 在ASP.NET MVC中过滤 [ ^ ]。

引用:

有时你想要先执行逻辑调用操作方法或在操作方法运行后。为了支持这一点,ASP.NET MVC提供了过滤器。过滤器是自定义类,提供声明式和编程式方法,用于向控制器操作方法添加操作前和操作后行为。


从这里开始,然后谷歌更多



在ASP中过滤。 NET MVC [ ^ ]

I am beginner in MVC and also i am using angularjs web api but till now days i am not understad waht is use of Filter in MVC so i want know about Filter in MVC

What I have tried:

I've tried from google and also implement logic but not sure exact logic of Filter in MVC

解决方案

Refer - Filtering in ASP.NET MVC[^].

Quote:

Sometimes you want to perform logic either before an action method is called or after an action method runs. To support this, ASP.NET MVC provides filters. Filters are custom classes that provide both a declarative and programmatic means to add pre-action and post-action behavior to controller action methods.


Start here, then google some more

Filtering in ASP.NET MVC[^]


这篇关于Waht是MVC中的使用过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆