Skip to content

KrupalPatel17/WebAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Employee Management API

Typing SVG

NET 8.0 SQL Server C# 11.0 EF Core

Welcome to the Employee Management Web API! This API allows you to manage employees, departments, locations, and more using C# .NET with PostgreSQL. 🚀


🌟 Features

CRUD operations for Employees 👥
Search Employees 🔍
Database Integration (PostgreSQL) 🛢️
RESTful API with Swagger 📜
Secure and Scalable Architecture 🔒
Added World's All Countries, States & Cities Data in It 🌍


🛠️ Tech Stack

  • Backend: C# (.NET Core) 🖥️
  • Database: PostgreSQL 🛢️
  • ORM: Entity Framework Core 🔄
  • API Documentation: Swagger 📜
  • Environment: Visual Studio Code 💻

📂 Folder Structure

📦 EmployeeManagementAPI
 ┣ 📂 Controllers
 ┃ ┣ 📜 EmployeeController.cs
 ┣ 📂 Models
 ┃ ┣ 📜 Employee.cs
 ┃ ┣ 📜 Department.cs
 ┃ ┣ 📜 Country.cs
 ┃ ┣ 📜 State.cs
 ┃ ┣ 📜 City.cs
 ┣ 📂 Data
 ┃ ┣ 📜 ApplicationDbContext.cs
 ┃ ┣ 📜 countries+states+cities.json
 ┣ 📜 Program.cs
 ┣ 📜 appsettings.json
 ┣ 📂 Script
 ┃ ┣ 📜 insert_data.py

🚀 Installation & Setup

📌 Prerequisites

  • Install .NET Core SDK
  • Install PostgreSQL
  • Install Visual Studio Code

📌 Steps to Run

# Clone the repository
git clone https://github.com/yourusername/EmployeeManagementAPI.git
cd EmployeeManagementAPI

# Install dependencies
dotnet restore

# Update database
dotnet ef database update

# Run the application
dotnet run

🌍 API Endpoints

HTTP Method Endpoint Description
GET /api/employees Get all employees
POST /api/employees Add a new employee
PUT /api/employees/{id} Update employee
DELETE /api/employees/{id} Delete employee
GET /api/employees/search?name=John Search employee by name

📜 Swagger API Documentation

🔹 Open your browser and go to:
👉 https://localhost:5001/swagger/index.html


🛠️ Contributing

💡 Contributions are welcome! Feel free to fork this repository and submit pull requests.

  1. Fork the repository
  2. Create a new branch (feature/your-feature)
  3. Commit your changes
  4. Push to your branch
  5. Submit a pull request

🤝 Contact

🔗 GitHub: KrupalPatel17


🎉 Happy Coding! 🚀

snake animation

Made with ❤️ by Krupal

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published