Professional Documents
Culture Documents
Finalize
It can be used to free unmanaged resources (when you implement it) like files,
database connections etc. held by an object before that object is destroyed.
Generics
Generic is a class which allows the user to define classes and methods with the
placeholder. Generics were added to version 2.0 of the C# language. The basic idea
behind using Generic is to allow type (Integer, String, � etc and user-defined
types) to be a parameter to methods, classes, and interfaces.
Routing in MVC
In the ASP.NET Web Forms application, every URL must match with a specific .aspx
file. For example, a URL http://domain/studentsinfo.aspx must match with the file
studentsinfo.aspx that contains code and markup for rendering a response to the
browser.
Route
Route defines the URL pattern and handler information. All the configured routes of
an application stored in RouteTable and will be used by Routing engine to determine
appropriate handler class or file for an incoming request.
Configure a Route
Every MVC application must configure (register) at least one route, which is
configured by MVC framework by default. You can register a route in RouteConfig
class, which is in RouteConfig.cs under App_Start folder. The following figure
illustrates how to configure a Route in the RouteConfig class .
Register Routes
Now, after configuring all the routes in RouteConfig class, you need to register it
in the Application_Start() event in the Global.asax. So that it includes all your
routes into RouteTable.
Routes can be configured in RouteConfig class. Multiple custom routes can also be
configured.
Route must be registered in Application_Start event in Global.ascx.cs file.
-------------------------------------------------------Desgin
Pattern--------------------------------------------------
There are 23 design patterns, also known as Gang of Four (GoF) design patterns.
These 23 patterns are grouped into three main categories based on their:
Creational, Structctural and Behavioral
The Factory Method defines an interface for creating objects, but lets subclasses
decide which classes to instantiate
There are situations in a project where we want only one instance of the object to
be created and shared among the clients.