What is API in .NET
Introduction
In this lesson, you will learn what is API in .NET for beginners. API is used to connect different applications and allow them to communicate with each other.
What is an API?
API (Application Programming Interface) is a way for two systems to communicate and exchange data.
Simple Example
- You use a mobile app
- App sends request to server
- Server sends response (data)
This communication happens using APIs.
How API Works
- Client sends request
- Server processes request
- Server sends response
Example in .NET
[ApiController]
[Route("api/[controller]")]
public class StudentController : ControllerBase
{
[HttpGet]
public string Get()
{
return "Hello API";
}
}
Types of APIs
- REST API
- SOAP API
- Web API
Real-World Use
- Mobile apps connect to backend
- Payment gateway integration
- Data sharing between systems
Key Points
- API connects different systems
- Used in web and mobile apps
- Important for backend development
Internal Links
- Course Page: .NET Course for Beginners



