How sdk2575/mslearn-tailspin-spacegame-web works
Tailspin SpaceGame Web is an ASP.NET MVC leaderboard and player-profile viewer. A browser request reaches HomeController: the leaderboard action filters, sorts, and pages scores, fetches each score’s profile, and returns a view model; the profile action fetches one profile and returns its view. Startup wires these requests to JSON-backed in-memory repositories. The graph reflects the sampled controller, repository, and startup code; view rendering is represented by the controller’s View results, while unsampled view details are not inferred.
Main entry points: HomeController.cs Home controller · Startup.cs Web startup · IDocumentDBRepository.cs Repository contract · Model.cs Base data model
Components 18
Web application
- Web startup
Tailspin.SpaceGame.Web/Startup.cs - Web host
Tailspin.SpaceGame.Web/Program.cs - Home controller
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Leaderboard page
Tailspin.SpaceGame.Web/Views/Home/Index.cshtml - Profile page
Tailspin.SpaceGame.Web/Views/Home/Profile.cshtml - Privacy page
Tailspin.SpaceGame.Web/Views/Home/Privacy.cshtml - Error page
Tailspin.SpaceGame.Web/Views/Shared/Error.cshtml
Game data
- Score model
Tailspin.SpaceGame.Web/Models/Score.cs - Profile model
Tailspin.SpaceGame.Web/Models/Profile.cs - Base data model
Tailspin.SpaceGame.Web/Models/Model.cs - Leaderboard model
Tailspin.SpaceGame.Web/Models/LeaderboardViewModel.cs - Profile model
Tailspin.SpaceGame.Web/Models/ProfileViewModel.cs - Error model
Tailspin.SpaceGame.Web/Models/ErrorViewModel.cs
Data access
- Repository contract
Tailspin.SpaceGame.Web/IDocumentDBRepository.cs - Local repository
Tailspin.SpaceGame.Web/LocalDocumentDBRepository.cs - Scores JSON
Tailspin.SpaceGame.Web/SampleData/scores.json - Profiles JSON
Tailspin.SpaceGame.Web/SampleData/profiles.json
Other components
- Browser visitor
Connections 21
- Web host → Web startup: uses startup
Tailspin.SpaceGame.Web/Program.cs - Web startup → Home controller: routes requests
Tailspin.SpaceGame.Web/Startup.cs - Web startup → Local repository: registers stores
Tailspin.SpaceGame.Web/Startup.cs - Web startup → Scores JSON: configures scores
Tailspin.SpaceGame.Web/Startup.cs - Web startup → Profiles JSON: configures profiles
Tailspin.SpaceGame.Web/Startup.cs - Local repository → Repository contract: implements
Tailspin.SpaceGame.Web/LocalDocumentDBRepository.cs - Home controller → Repository contract: queries scores
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Repository contract: fetches profiles
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Score model: filters and sorts
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Profile model: combines profile
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Leaderboard model: builds view model
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Profile model: builds view model
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Error model: builds error model
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Leaderboard page: returns view
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Profile page: returns view
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Privacy page: returns view
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Home controller → Error page: returns view
Tailspin.SpaceGame.Web/Controllers/HomeController.cs - Browser visitor → Home controller: requests page
- Score model → Base data model: inherits
Tailspin.SpaceGame.Web/Models/Score.cs - Profile model → Base data model: inherits
Tailspin.SpaceGame.Web/Models/Profile.cs - Repository contract → Base data model: constrains items
Tailspin.SpaceGame.Web/IDocumentDBRepository.cs