/HotelListing.API.NET

Hands-on .NET 7 project built from scratch, following "Ultimate ASP.NET Core Web API Development Guide" by Trevoir Williams. Demonstrates modern ASP.NET Core practices and architecture.

Primary LanguageC#

Hotel Listing API

This repository contains the follow-along exercise project HotelListing API from "Ultimate ASP.NET Core Web API Development Guide" made by Trevoir Williams. It is built using .NET Core 7. The project covers REST principles, connecting to a database, using Swagger, and developing custom middleware to bring out the full feature set of a .NET API.

Table of Contents

Technologies

The project uses the following technologies:

  • .NET Core 7
  • REST principles
  • Swagger
  • Entity Framework Core
  • SQL Server
  • Serilog

Getting Started

To get started with the project, follow these steps:

  1. Clone the repository to your local machine.
  2. Install the .NET Core 7 SDK and SQL Server on your machine.
  3. Update the connection string in the appsettings.json file with your SQL Server connection string.
  4. Open the solution file in Visual Studio or another IDE of your choice.
  5. Restore the NuGet packages.
  6. Set the startup project to HotelListing.API.
  7. Run the project.

Project Structure

The solution is composed of the following projects:

  • Core: Contains the application logic and interfaces.
  • Data: Contains the domain models and business rules.
  • API: Contains the Web API controllers and middleware.

Code Samples

The project contains code samples for several areas of .NET Core development, including:

  • REST principles
  • Swagger
  • Entity Framework Core
  • SQL Server
  • Custom middleware