.NET Framework supplied several different namespaces, which ASP.NET apps depend on. Among the most often met ones are these:

  • System: The root namespace, System holds basic classes and base types. Types from this namespace—e.g., Object, String, Int32, DateTime—will be used often.  
  • System.Collections and System.Collections: These namespaces offer interfaces and classes defining several object collections like lists, dictionaries, queues, stacks. The Generic variant provides type safety.  

 

  • System.IO: Has types for handling directories, files, and input and output streams.  
  • System.Net: Offers classes for network development including HTTP, TCP, and UDP.

 

  • System.Linq: Provides classes and extension methods for Language Integrated Query (LINQ) lets you consistently query and alter data from many different sources.
  • System.Data and System.Data.SqlClient (and other data sources including Working with databases depends on these namespaces. 
    • System.Data.SqlClientt are for SQL Server interaction, data offers base classes for data access. 
    • Under Microsoft.Entity Framework Core has its own collection of namespaces.Entity Framework Core.  
    •  
  • System.Web: Classic ASP.NET Web Forms applications depend on this namespace. It has classes for managing HTTP requests, responses, sessions, cookies, and more (HttpContext, HttpRequest, HttpResponse, HttpSessionState).  

 

  • System.Web.UI and its sub-namespaces, for example,Specific to ASP.NET Web Forms, System.Web.UI.WebControls, System.Web.UI.HtmlControls include classes for building user interface components (controls, pages).  
    System.Web.Mvc: Classes for controllers, views, and model binding provide this namespace, which is the foundation for ASP.NET MVC (Model-View-Controller) applications.  

 

  • System.Web.Http: This namespace is for creating Web APIs using ASP.NET Web API framework.  
  • Microsoft.AspNetCore and its sub-namespaces, such as
  • Microsoft.AspNetCore.Http, Microsoft.AspNetCore.Mvc,
    • These are the fundamental namespaces for contemporary ASP.NET Core applications, hence laying the groundwork for MVC, Razor Pages, Web APIs, and more.
    •  
  • Microsoft.Extensions and its sub-namespaces
    • Microsoft.Extensions.Configuration, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.Logging— These offer fundamental services and abstractions used throughout ASP.NET Core for configuration, dependency injection, logging, etc.

Related Question