Skip to content

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Sep 26, 2025

Migrate HomeController to .NET Core 6

Summary

This PR creates a new .NET Core 6 project (SampleWebApp.Core) and migrates the HomeController from the existing ASP.NET MVC 5 (.NET Framework 4.5.1) project. The migration demonstrates the modernization path from legacy .NET Framework to .NET Core 6.

Key Changes:

  • Created new SampleWebApp.Core project with .NET Core 6 MVC configuration
  • Migrated HomeController with updated namespaces (System.Web.MvcMicrosoft.AspNetCore.Mvc) and return types (ActionResultIActionResult)
  • Updated InternalsInfo model to use .NET Core compatible memory APIs (GC.GetGCMemoryInfo() instead of PerformanceCounter)
  • Migrated all Home views (Index, About, Contact, Internals, CodeView) with tag helper syntax
  • Added comprehensive README documentation explaining the migration approach

The new project runs successfully and all HomeController actions have been tested locally.

Review & Testing Checklist for Human

⚠️ 3 critical items to verify:

  • Compare memory metrics between versions: Test both the original MVC5 /Home/Internals and new .NET Core /Home/Internals pages side-by-side to verify the memory metrics are reasonable and comparable (the API change from PerformanceCounter to GC.GetGCMemoryInfo may show different values)

  • Verify migration architecture aligns with requirements: Confirm that creating a separate .NET Core project (rather than in-place migration) matches your intended approach for modernizing this application

  • Test all controller actions: Navigate through all HomeController actions (Index, About, Contact, Internals, CodeView) in the new .NET Core version and verify they render correctly and match expected behavior

Test Plan

  1. Run original project: cd SampleWebApp && dotnet build (if supported) or use Visual Studio
  2. Run new project: cd SampleWebApp.Core && dotnet run
  3. Compare both versions side-by-side, especially the Internals page metrics
  4. Verify all navigation links and views render properly

Notes

  • Only HomeController was migrated; other controllers (Posts, Tags, etc.) remain in the original MVC5 project
  • The memory measurement approach changed significantly - review if the new metrics provide equivalent business value
  • This creates a dual-project maintenance scenario until full migration is complete

Session: https://app.devin.ai/sessions/dc3dff3d33f648718d4435fc8f000539
Requested by: ben-windsurf (@ben-windsurf)

- Created new .NET Core 6 project (SampleWebApp.Core)
- Migrated HomeController with updated namespaces (System.Web.Mvc -> Microsoft.AspNetCore.Mvc)
- Updated return types from ActionResult to IActionResult
- Migrated InternalsInfo model with .NET Core compatible memory metrics
- Migrated all Home views (Index, About, Contact, Internals, CodeView) with tag helper syntax
- Updated Program.cs to configure MVC services and routing
- Created proper .NET Core project structure with _ViewImports, _ViewStart, and _Layout files
- Successfully tested all controller actions - application builds and runs correctly

Co-Authored-By: ben.lehrburger@windsurf.com <ben.lehrburger@windsurf.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

- Added new section explaining .NET Core 6 migration
- Documented dual project structure (SampleWebApp vs SampleWebApp.Core)
- Listed key migration changes: namespaces, return types, memory metrics, views
- Added instructions for running the .NET Core 6 version
- Described all migrated HomeController actions

Co-Authored-By: ben.lehrburger@windsurf.com <ben.lehrburger@windsurf.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant