How to Consuming an API in ASP.NET Core

Last Updated: March 20, 2019

aspnet core consume api

In the API Controllers project I Created an API in ASP.NET Core, now I have to consume the API. For this I have to create a new project. So create a new empty project by using the ASP.NET Core Web Application (.NET Core) template, and name the project as ‘APIConsume’. (more…)

API Controllers – Creating API in ASP.NET Core

Last Updated: March 19, 2019

api controllers aspnet core

API controllers are just like regular controllers except that their action methods produce responses which contain data objects and are sent to the client without HTML markup. Since not all clients are browsers so to provide them with data we your API Controllers. (more…)

Areas and Routing in ASP.NET Core

Last Updated: March 3, 2019

aspnet core areas

Areas in ASP.NET Core MVC represent a functional segment of the application. It can be administration, billing, sales, etc. If your application becomes very large then it will have many controllers, Models & Views. (more…)

ASP.NET Core Routing: Generating Outgoing URLs in Views

Last Updated: February 22, 2019

aspnet core generate url routing

The URL Routing is also used to create Outgoing URLs in Views. They address an important maintenance issue because the links are created automatically based on the routes in your application. So if you change the routes, the links created in the Views are automatically changed based on the new route and you don’t have to manually change the links one by one. (more…)

Learn Attribute Routing in ASP.NET Core

Last Updated: February 22, 2019

attribute routing aspnet core

So far what you have seen is Convention Routing. There is another technique of routing which is known by the name of Attribute Routing. In Attribute Routing you apply route as C# attributes directly to the controller and actions. (more…)

Learn ASP.NET Core Route Constraint in details with lots of examples

Last Updated: February 3, 2019

constraining-routes-aspnet-core

On my last tutorial I covered ASP.NET Core Convention-Based URL Routing. I will now teach to restrict Routes to a set of URL. This is done by Constraining Routes. Let’s start it with a simple example by add the following route to your application. (more…)

Learn ASP.NET Core Convention-Based URL Routing

Last Updated: February 3, 2019

url routing aspnet core

ASP.NET Core MVC URL Routing is used to create patterns of URLs for your application. The Routing System has 2 functions: 1. Maps the incoming URLs to Controllers and Actions. 2. Generates outgoing URLs so that a specific action method is called with the user clicks the link. (more…)

Views in ASP.NET Core

Last Updated: January 23, 2019

aspnet core views

On my last tutorial on Action in ASP.NET Core I tough about how to pass Data from Action Methods to Views. I hope you liked it, now I continue to the topic of Views which forms the UI of the application. I start with Shared Views which are basically those Views that are kept inside the 'Shared' folder. (more…)

jQuery toggleClass Method – .toggleClass() Tutorial

Last Updated: January 16, 2019

jquery toggleclass

If you want to toggle between adding and removing classes from selected elements then use the jQuery toggleClass method. If an element does not have a particular class then this method will add that class to the element. (more…)

Actions in ASP.NET Core

Last Updated: January 19, 2019

actions aspnet core

On my last tutorial on Controllers in ASP.NET Core I tough about Controller. A controller contains Action methods, they can have any return type like string, int, datetime, ViewResult, IActionResult, etc. In all of them the return type of IActionResult is quite useful. It is because it fits everywhere, allowing the action method to return a View, redirect to another View, or return a data type like string, int, datetime, etc. (more…)