Skip to content

A RESTful API built using ASP.NET Core (.NET 8) for managing tasks, users, and projects. This API allows for the creation, updating, assignment, and tracking of tasks across multiple projects, along with user management.

Notifications You must be signed in to change notification settings

marijatopalova/TaskManagementSystem

Repository files navigation

Task Management API

Overview

A RESTful API built using ASP.NET Core (.NET 8) for managing tasks, users, and projects. This API allows for the creation, updating, assignment, and tracking of tasks across multiple projects, along with user management.


Features

  • User Management: Create, update, delete, and retrieve user data.
  • Task Management: Create, update, delete, and retrieve tasks associated with users and projects.
  • Project Management: Manage projects and associate users and tasks with each project.
  • Swagger Integration: Comprehensive API documentation with descriptions for each endpoint.
  • NUnit Testing: Unit tests for services and repositories.

Technologies

  • ASP.NET Core (.NET 8)
  • Entity Framework Core
  • NUnit (for unit testing)
  • Swagger / Swashbuckle
  • SQL Server

Getting Started

Prerequisites

Ensure you have the following installed:

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/marijatopalova/TaskManagementSystem.git
    cd TaskManagementSystem
  2. Update the connection string:

    In appsettings.json, update the connection string for your SQL Server instance:

    "ConnectionStrings": {
        "DefaultConnection": "Server=YOUR_SERVER;Database=TaskManagementDb;Trusted_Connection=True;MultipleActiveResultSets=true"
    }
  3. Run database migrations:

    Apply the migrations to your database:

    dotnet ef database update
  4. Run the application:

    Start the application:

    dotnet run
  5. Access Swagger UI:

    Open http://localhost:44330/swagger to explore the API documentation.


API Endpoints

User Endpoints

  • GET /api/user - Get a list of users
  • POST /api/user - Create a new user
  • GET /api/user/{userId} - Get a user by ID
  • GET /api/user/project/{projectId} - Get a list of users by project ID

Task Endpoints

  • GET /api/task/user/{userId} - Get a task by user ID
  • POST /api/task - Create a new task
  • GET /api/task/project/{projectId} - Get a task by project ID
  • PATCH /api/task/{taskId} - Update a task
  • GET /api/task/{taskId} - Get a task by ID

Project Endpoints

  • GET /api/project - Get a list of projects
  • POST /api/project - Create a new project
  • GET /api/project/{projectId} - Get a project by ID
  • POST /api/project/{projectId}/user/{userId} - Add user to a project
  • DELETE /api/project/{projectId}/user/{userId} - Delete a user from the project

Testing

Unit tests are implemented using NUnit. To run the tests:

dotnet test

About

A RESTful API built using ASP.NET Core (.NET 8) for managing tasks, users, and projects. This API allows for the creation, updating, assignment, and tracking of tasks across multiple projects, along with user management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages