Skip to content

Remove unused usings #36838

@smiller7812

Description

@smiller7812

Description

These are the only three namespaces I need for the Index page:

using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore;
using RazorPagesMovie.Models;

You might want to right click on the using statements at the top of all your pages and select "Remove and Sort Usings" to get rid of unneeded usings.
As you write code if you let intelligence finish off class names [hit tab] the VS IDE automatically inserts the needed using statement back in.

Page URL

https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/page?view=aspnetcore-10.0&tabs=visual-studio

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/razor-pages/page.md

Document ID

15e79e80-8d46-7cd5-c883-6cc0f5940a1b

Platform Id

c731bb82-fefd-1cfc-91d3-8ea9527d2680

Article author

@wadepickett

Metadata

  • ID: 70f6104a-a223-4bb3-4101-f553002b9b26
  • PlatformId: c731bb82-fefd-1cfc-91d3-8ea9527d2680
  • Service: aspnet-core
  • Sub-service: tutorials

Related Issues


Associated WorkItem - 558794

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions