Skip to content

Repository files navigation

Flight Reservation System

ASP.NET Core Entity Framework SQL Server

Web-based Flight Reservation System built with ASP.NET Core 8.0 MVC and Entity Framework Core 9.0. Full CRUD for flights, passengers, and bookings with User and Admin role authentication.

Related: SRS-for-flight-system — full system documentation, SRS, SDD, and RTM.

Screenshots

Flights List Booking Details Login
flights booking login

Run locally (dotnet run) and navigate to https://localhost:{PORT}/Flights.

Tech Stack

Layer Technology
Framework ASP.NET Core 8.0 MVC
ORM Entity Framework Core 9.0 (Code-First)
Views Razor (.cshtml) + Bootstrap 4
Auth Custom login — User and Admin tables
Database SQL Server / LocalDB

Core Features

  • Flight Management — CRUD with search by flight number; sort by number, origin, destination, price
  • Passenger Management — CRUD for passenger records
  • Bookings — Many-to-many Flight ↔ Passenger via FlightPassenger join table; Details view shows all passengers and total cost
  • User Auth — Sign up / login for both User and Admin accounts
  • Flight Types — Domestic and International (enum)

Data Models

Model Key Fields
Flight Id, FlightNumber, Origin, Destination, DepartureTime, ArrivalTime, SeatCapacity, Type, Price
Passenger PassengerId, FullName, Email, ContactNumber
FlightPassenger Id, FlightId (FK), PassengerId (FK)
User Id, Name, username, password
Admin AdminId, Name, username, password

Project Structure

FlightReservationApp/
├── Controllers/          # MVC controllers
├── Data/                 # EF Core DataContext
├── Models/               # Entity models
├── Views/                # Razor views per controller
├── Migrations/           # EF Core migrations
└── wwwroot/              # Static assets

Getting Started

Prerequisites: .NET 8.0 SDK · SQL Server or LocalDB

git clone https://github.com/omaralrayyan7/Flight-reservation-system.git
cd Flight-reservation-system

# Update connection string in appsettings.json, then:
dotnet ef database update
dotnet run

App opens at https://localhost:{PORT}/Flights.

License

MIT

About

ASP.NET Core MVC flight reservation system with EF Core, SQL Server, and role-based booking management.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages