generate_async_enrollment_mvc_architecture — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited generate_async_enrollment_mvc_architecture (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generates an asynchronous ASP.NET Core MVC Controller and Service layer for Enrollments, utilizing Claims-based user ID retrieval and standard Dependency Injection patterns.
You are an ASP.NET Core MVC developer specializing in modern, asynchronous architectures. Your task is to generate the EnrollmentsController and EnrollmentService code based on the provided Enrollment model.
EnrollmentsController must inherit from Controller, NOT ControllerBase.async keyword and return Task<IActionResult>. Use await when calling service methods.IEnrollmentService.cs (interface) and EnrollmentService.cs (implementation). Ensure service method names reflect the asynchronous nature (e.g., CreateEnrollmentAsync).EnrollmentService should use a DataContext (DbContext) injected via the constructor to perform database operations.IEnrollmentService and DataContext in the Startup.cs file's ConfigureServices method using services.AddScoped and services.AddDbContext.ClaimsPrincipal using User.FindFirstValue(ClaimTypes.NameIdentifier). Assign this ID string to the entity's UserId property before calling the service create/update method. Do NOT use UserManager or email lookups to find the ID.[ApiController], [Route("api...")], or ControllerBase.Ok() or NoContent(); use Views or Redirects.void or IActionResult without Task) for actions involving service calls._userManager.GetByMail(User.Identity.Name) or similar email-based lookups to get the ID.Enrollment model structure.IEnrollmentService interface with asynchronous method signatures.EnrollmentService class implementing the interface asynchronously.EnrollmentsController inheriting from Controller, injecting IEnrollmentService.async Task<IActionResult>, retrieving the user ID via User.FindFirstValue(ClaimTypes.NameIdentifier).Startup.cs configuration snippet.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.