Skip to content

This project is a basic CRUD application built using ASP.NET Core. It demonstrates how to use `dotnet watch` for improved development speed and how to utilize Docker for containerization.

Notifications You must be signed in to change notification settings

Trihydro/dotnet-watch-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotnet Watch Demo

This project is a basic CRUD application built using ASP.NET Core. It demonstrates how to use dotnet watch for improved development speed and how to utilize Docker for containerization.

Project Structure

The project consists of the following main components:

  • src/DotnetWatchDemo.Api: The API project containing the controllers, models, and data access layer.

    • Controllers: Contains the ItemsController which handles HTTP requests for item management.
    • Models: Contains the Item model representing the data structure for items.
    • Data: Contains the ApplicationDbContext for database interactions and DbInitializer for seeding initial data.
    • Program.cs: The entry point of the application.
    • appsettings.json: Configuration settings for the application.
    • appsettings.Development.json: Development-specific configuration settings.
  • docker-compose.yml: Defines the services and configurations for running the application in Docker.

  • .dockerignore: Specifies files and directories to be ignored by Docker during the build process.

Getting Started

Prerequisites

  • .NET SDK
  • Docker

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd dotnet-watch-demo
    
  2. Restore the dependencies:

    dotnet restore src/DotnetWatchDemo.Api/DotnetWatchDemo.Api.csproj
    
  3. Run the application using dotnet watch:

    cd src/DotnetWatchDemo.Api
    dotnet watch run
    
  4. Alternatively, run the application using Docker:

    docker-compose up --build
    

Usage

Once the application is running, you can access the API endpoints to perform CRUD operations on items. Use tools like Postman or curl to interact with the API.

Contributing

Feel free to submit issues or pull requests for improvements or bug fixes.

License

This project is licensed under the MIT License.

About

This project is a basic CRUD application built using ASP.NET Core. It demonstrates how to use `dotnet watch` for improved development speed and how to utilize Docker for containerization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published