Skip to content

NeckerFree/StudentsWebApp

Repository files navigation

📗 Table of Contents

📖 Students Web App

Students Web App is a Fullstack application that implements an Angular App consumming a Minimal API service to manage the CRUD of a Sqlite database with a Student table.

Web API Service Image:

Web API Service

Application Images:

Students App

New Student

Delete Confirm

🛠 Built With .NET/VS Code

Client
Server
Database

Key Features

  • GenericRepository
  • Dependency Injection
  • Unit Testing
  • Git Flow
  • CORS

(back to top)

💻 Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

Option 1: Visual Studio .NET 2022 updated to use NET Core 7

  1. Open the solution StudentsWebApp.sln
  2. Configure Multiple Startup Projects as shown in the image:

Net Config

  1. Rebuild Solution to assure that all projects are compiling
  2. Click Start of F5
  3. Api Service and Angular App start simultaneosly
  4. Wait until Angular App loads students data

Option 2: Visual Studio Code with extensions:

  • C# for Visual Studio Code
  • vscode-solution-explorer
  1. Open the folder StudentsWebApp containning the solution
  2. Enter code . command to open VS Code
  3. Open folder \SWA.WebAPIService in Terminal and run dotnet build and dotnet run commands
  4. Open folder \SWA.StudentsApp in Terminal and run dotnet build and dotnet run commands
  5. Open Service URL in the browser: https://localhost:7210/swagger/index.html
  6. Open App URL in the browser: https://localhost:7183
  7. Wait until Angular App loads students data

VS Code Run

Setup

Clone this repository to your desired folder:

Example commands:

cd [Desired_Folder] git clone https://github.com/NeckerFree/StudentsWebApp cd StudentsWebApp

Install

Install this project with:

If necessary configure Base API Service URL in SWA.StudentsApp\ClientApp\proxy.conf.js variable: target: 'https://localhost:7210/'

Step 2,3 in Option 1 (VS.NET) Steps 3,4 in Option 2 (VS Code)

Copy the database to a any different folder of this solution

  • Default folder (C:\Temp):
  • Config file: SWA.WebAPIService\appsettings.json
  • String connection: "StudentsDBConnection": "Data Source=C:\Temp\sample_DB.db3"

Usage

To run the project, execute the following command:

Step 4 in Option 1 (VS.NET) Steps 3,4 in Option 2 (VS Code)

(back to top)

👥 Authors

👤 Elio Cortés

(back to top)

🔭 Future Features

  • To complete unit testing configuration

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project please start my project

(back to top)

❓ FAQ

Add at least 2 questions new developers would ask when they decide to use your project.

  • What commands are required to Scaffold SQLite database?

    • dotnet add package Microsoft.EntityFrameworkCore.Design
    • dotnet tool install --global dotnet-ef
    • dotnet add package Microsoft.EntityFrameworkCore.Sqlite
    • dotnet ef dbcontext scaffold "data source=C:\Temp\sample_DB.db3" Microsoft.EntityFrameworkCore.Sqlite --output-dir Models --context-dir Data --namespace SWA.DataAccess.Models --context-namespace SWA.DataAccess.Data --context StudentsContext -f --no-onconfiguring
  • How can I generate and/or modifies files based on a schematic.

(back to top)

📝 License

This project is MIT licensed.

(back to top)