Skip to content

Latest commit

 

History

History
69 lines (65 loc) · 3.17 KB

File metadata and controls

69 lines (65 loc) · 3.17 KB

TaskTracker

Full-stack project task and employee management app with CRUD functionality for projects, tasks, employees, departments, and roles using ASP.NET Core, Angular Material, and SQL Server.

Manual Creation steps:

  • Create ASP.NET Core Web API ~dotnet new webapi -n TaskTracker.Server -f net8.0
  • Create Angular client~npx @angular/cli@latest new TaskTracker.client--skip-git --routing --style=css
  • Create Solution File ~dotnet new sln -n TaskTracker
  • Add Project to the Solution~dotnet sln add'.\TaskTracker.Server\TaskTracker.csproj'

SQL Script

  • Create database if it doesn't exist.
  • It will use the database
  • Drop existing tables, if they exist.
  • Create tables with fields
  • Insert sample data.
  • Verify the table structures.
  • Verify the constraints for all tables.
  • Verify the inserted data in all tables.

Backend API with ASP.NET Core

  • Add Required NuGet Packages
    • Microsoft.EntityFrameworkCore
    • Microsoft.EntityFrameworkCore.SqlServer
    • Microsoft.EntityFrameworkCore.Tools
    • AutoMapper
      • Simplifies the process of transferring data between different objects
  • Create Models with data annotations.
  • Create Dtos(Data Transder Objects) to transfer only the required data between the client and server.
  • Create Mapping Profile for Entity and Dto.
  • Create Database Context TestDbContext. The DbContext simplifies database interactions, manages entities and their relationships, and ensures data consistency.
  • Create IRepositories(Interface) and Repositories for each model with async methods to abstract data access logic, promotes separation of concerns, and makes the code cleaner, more maintainable, and easier to test.
  • Create Controllers for each model to handle incoming HTTP requests, process the HTTP requests, and return appropriate responses.
  • Configure appsettings.json with the proper connection string to the proper database.
  • Configure Program.cs to use connection string to SQL Server.
  • Test all methods on Swagger.
  • Clean and Rebuild
    • ~dotnet clean
    • ~Remove-Item .\Migrations -Recurse -Force -ErrorAction SilentlyContinue
    • ~dotnet ef migrations add InitialCreate --verbose
    • ~dotnet ef database update --verbose

Frontend with Angular Material

  • Create new Angular Project.
  • Install Angular Material.
  • Update all Angular packages to the same version, this case v20.
  • Update Typescript to a compatible version.
  • Create models.
  • Create services to handle communication with database and snackbar.
  • Configure environment files for development and production.
  • Create components.
  • Test all components.