Calling a different action method for the same URL

Calling a different action method for the same URL

Scenario is something like this:

Scenario is something like this:

I have a website where users can create their own stores. Upon creation, they have an option to choose a store template. Right now, whatever template you choose, when you go to a URL (lets say /home), it calls the same action method and then does a call to BLL from that action method.

Now, I want to retrieve data using ASP.NET Web API instead of directly from MVC Controllers but I want it only for 1 particular template. It still needs to have the same URL for /home as the other templates even though its retrieval is different now.

I wanted to ask if there is a way that I have a global flag that I can turn on (eg. APIEnabled) and then based on that flag, use a different action method from the same GET request.

I understand that with this flag I can just do a condition inside the action method but I feel it will make my Action methods messy.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Add asp.net Identity in empty project

LIKE | COMMENT | SHARE | SUBSCRIBE Today, in this tutorial you will see the process of adding an ASP.NET Identity to the ASP.NET Web Application developed in...

List all users from asp net core identity

LIKE | COMMENT | SHARE | SUBSCRIBE In this video, i will show you How to retrieve and display all the registered application users in asp.net core using the ...

Extend IdentityUser in ASP NET Core

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorials, I will show you how to extend IdentityUser in asp.net core.. Subscribe & Stay Connected! Thank You! ♥ #...