Help Desk Ticket Management System built using ASP.NET Core Web API, ASP.NET Core MVC, Entity Framework Core, SQL Server, xUnit, Moq and GitHub.
- HelpDesk.Api — ASP.NET Core Web API. EF Core + SQL Server, Repository Pattern, TicketController.
- HelpDesk.Mvc — ASP.NET Core MVC app. Consumes the Web API via a Service Layer (HttpClient). No direct DB access.
- HelpDesk.Tests — xUnit + Moq unit tests for TicketController (repository mocked, no SQL Server dependency).
- Update the connection string in
HelpDesk.Api/appsettings.jsonto point to your SQL Server instance. - Open a terminal in
HelpDesk.Apiand run:(Install the EF tool first if needed:dotnet ef migrations add InitialCreate dotnet ef database updatedotnet tool install --global dotnet-ef) - Run the API:
dotnet run— note the port shown (e.g.https://localhost:7100), Swagger UI is at/swagger.
- Update
ApiBaseUrlinHelpDesk.Mvc/appsettings.jsonto match the port the API is running on. - Run:
dotnet run
Run: dotnet test
| Method | URL | Description |
|---|---|---|
| GET | /api/Ticket/All | Get all tickets |
| GET | /api/Ticket/{id} | Get ticket by Id |
| POST | /api/Ticket | Create a new ticket |
| PUT | /api/Ticket/{id} | Update an existing ticket |
| DELETE | /api/Ticket/{id} | Delete a ticket |
| GET | /api/Ticket/Status/{status} | Get all tickets by status |