Overview

SportsPro is an ASP.NET MVC web app for a technical support department. It lets support staff Create, Read, Update, and Delete records for Customers, Technicians, Products, Incidents, and Registrations. Data is stored in SQL Server and accessed via Entity Framework Core. Routing, session management, and form validation are all configured for a secure, user-friendly workflow.

SportsPro Application Screenshot SportsPro Application Screenshot

Sample Code (IncidentsController.cs)

using Microsoft.AspNetCore.Mvc;
using SportsPro.Models;
using SportsPro.Data;

namespace SportsPro.Controllers
{
    public class IncidentsController : Controller
    {
        private readonly SportsProContext _context;

        public IncidentsController(SportsProContext context)
        {
            _context = context;
        }

        // GET: Incidents/Create
        public IActionResult Create()
        {
            return View();
        }

        // POST: Incidents/Create
        [HttpPost]
        [ValidateAntiForgeryToken]
        public async Task Create([Bind("CustomerID,ProductCode,TechnicianID,DateOpened,Title,Description")] Incident incident)
        {
            if (ModelState.IsValid)
            {
                _context.Add(incident);
                await _context.SaveChangesAsync();
                return RedirectToAction(nameof(Index));
            }
            return View(incident);
        }
    }
}