Simple RESTfull API with .NET CORE

Can Yüksel
May 5, 2022

--

Hi everyone,

Let’s let’s write a simple RESTfull API.Firstly create a new Project but that’s Project must be Asp.Net Core Web API.

Now, create a new controller that’s Project. But what is this Controller? Let’s take a look at Controller.

“Web Api controller is similar to controllers in Mvc projects due to its structure. The Web Api controller receives incoming HTTP requests and returns a response to the client.”

If created new Controller,we will can define to a string message.

Now , Let’s test for our RESTfull API.For this process, we will run our project and use swagger.

Let’s request to swagger.

Let’s Response “Hello,Welcome To My API” to swagger.

Today is write a simple RESTfull API.

Thank you for reading. I wish error free codes.

--

--

Can Yüksel

I’m Mining and software Engineer. I’m study at Dokuz Eylül University. I share the information I learned while developing myself in the field of software.