I'm currently porting a MVC 5 app that require to detect if the current controller action is not a "child action".
public class MyController : Controller
{
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
if (!filterContext.IsChildAction) {
// Do something if not a child action
}
}
}
Is there another way to do it in MVC Core ? or is there a redesign in MVC Core that disable this "notion" ?
I finally found more information about MVC 6 Child Actions
replacement here: Goodbye Child Actions, Hello View Components
Hope it will help someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With