Building a School Attendance System in Blazor & .NET 10 | Naija Prime School Sprint 4

:graduation_cap: Naija Prime School โ€” Sprint 4: Attendance
Daily registers ยท Per-subject sessions ยท Submit/Reopen lifecycle ยท Class summaries

In this tutorial, I walk through the complete smoke test for Sprint 4 of the Naija Prime School project โ€” the sprint where the application finally starts carrying real day-to-day classroom data. After this sprint ships, every classroom day generates a register, every lesson on the timetable can generate a per-subject session, and the school can pull a per-pupil attendance percentage for any term.

:brick: What's covered in this sprint
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  • Two parallel attendance models โ€” DailyAttendanceRegister (class by date) and SubjectAttendanceSession (timetable entry by date) โ€” sharing one AttendanceStatus lookup
  • A submit/reopen lifecycle that supports late corrections without losing the audit trail
  • Auto pre-population of registers from open enrolments (no manual roster entry)
  • Automatic term resolution based on the date being marked
  • Weekday-vs-date validation for per-subject sessions (catches Monday lessons on a Wednesday)
  • Composite unique indexes that make duplicate registers impossible at the database level
  • Inline grid editing with Radzen Blazor components โ€” fast enough for real classroom use
  • A per-class attendance summary with green/amber/red percentage badges (90% and above, 75% and above, below 75%)

:hammer_and_wrench: Tech stack
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  • .NET 10
  • Blazor Web App (Auto render mode)
  • EF Core 10
  • Microsoft SQL Server
  • Radzen Blazor components
  • Visual Studio Code with the C# Dev Kit

:clipboard: Smoke test demonstrated in this video
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  1. Build, migrate, and run the app
  2. Set up prerequisites (session, term, class, subject, timetable entry, enrolled pupil)
  3. Open and submit a daily register for Primary 1A
  4. Take a per-subject register for a Monday Mathematics lesson
  5. Verify error paths โ€” wrong weekday, missing term, deleting a submitted register
  6. Verify the summary view with percentage bands
  7. Confirm soft-delete and audit columns directly in SQL Server

:inbox_tray: Downloads and source code
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
:page_facing_up: Implementation guide PDF (full long-form walkthrough โ€” 78 pages):

:laptop: Source code for this sprint (branch: sprint/4-attendance):

The PDF covers every design decision, every entity, every DTO, every service method, the full EF Core migration, all three Razor pages, and a troubleshooting section โ€” far more detail than fits in a single video. If you want to recreate the sprint from scratch, the PDF is your friend.

:books: Built on previous sprints
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
This sprint leans on Sprint 1 (identity, auditing, and soft-delete primitives), Sprint 2 (academic domain โ€” sessions, terms, classes, subjects, timetable), and Sprint 3 (students, parents, enrolments). If you're new to the series, I'd recommend watching those first โ€” but the design decisions chapter near the start of the PDF should bring you up to speed quickly.

:soon_arrow: Coming up next
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Sprint 5 lands assessments and report cards on top of the attendance data primitives established here. Subscribe so you don't miss it.

:+1: If this helped, please like, comment, and share โ€” it genuinely helps the channel grow. Drop any questions about the implementation in the comments and I'll do my best to answer.

#dotnet #blazor #efcore #sqlserver #radzen #csharp #softwareengineering #schoolmanagementsystem

The submit/reopen lifecycle is a good touch. In real school systems, attendance often needs correction after the initial register is submitted, so keeping an audit trail instead of overwriting the original state makes sense.

The separate daily and per-subject models also seem practical. The summary view looks especially useful once staff need a quick way to check attendance percentages. For anyone looking at how these percentages are calculated from attended classes, tools such as https://attendcalc.com/sbtet-attendance-calculator/ show the basic attendance calculation workflow.

One thing worth considering for later is how to handle students who transfer classes or join mid-term, so historical attendance remains attached to the correct enrolment period. The auto-population from open enrolments already gives you a solid base for that.