MVC Notes

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

MVC

What is View Bag


ViewBag is collection of viewData.
When I use TEMP DATA?
If you want to maintain data for complete request
ie. Action to action , or action to view
Then you will use TEMP DATA
Temp Data is for only one request.
When I use ViewBag ?
If you want to maintain data just from action to view then you will use ViewBag
What Is Models?
Models are nothing but modern c sharp classes, Which have business logic and
which provides data.
What is Razor ?
Razoris noting but it is new kind of view engine to display pages which helps us
to create pages and display UI using MVC ASP.Net .
What Is Modal Binders ?
Model binder is
What Is Entity Framework ?
Entity Framework is ORM , Object relational mapping.

ASP.Net / OOPS

What us IOC (Inversion of control)


o Where we move unwanted work for example work will affects to
class & some other class who will takes this responsibility in more
better way it termed as Inversion of control
o IOC (Inversion of control) is a general parent term while DI
(Dependency injection) is a subset of IOC. IOC is a concept where
the flow of application is inverted. So for example rather than the
caller calling the method.
o The Inversion of Control (IOC) and Dependency Injection (DI)
patterns are all about removing dependencies from your code.
What is dependency injection?
o Dependency injection is a software design pattern that implements
inversion of control for resolving dependencies.
IOC is an principle.

What is Factory Method?


o Provide an interface for creating families of related or dependent objects without
specifying their concrete classes

What
o
o
o
o
o

What is builder pattern?


o Separate the construction of a complex object from its representation, allowing
the same construction process to create various representations.

What is faade pattern?


o Provide a unified interface to a set of interfaces in a subsystem. Facade defines a
higher-level interface that makes the subsystem easier to use.

What is Single Responsibility Principle (SRP)?


o the single responsibility principle states that every class should
have responsibility over a single part of the functionality provided by the
software, and that responsibility should be entirely encapsulated by the class.

What is open closed principle


o software entities (classes, modules, functions, etc.) should be open for extension,
but closed for modification"; that is, such an entity can allow its behaviour to be
extended without modifying its source code.

What is Liskov substitution ?


o Liskov substitution principle(LSP) is a particular definition of a subtyping relation

OOPS

is solid ?
Single responsibility,
Open-closed,
Liskov substitution,
Interface segregation
Dependency inversion

Class
o It is a collection of objects.

Object
It is a real time entity.
An object can be considered a "thing" that can perform a set of related activities.
The set of activities that the object performs defines the object's behaviour
Destructor
o Destructor in c# is a special method of a class which will invoke automatically
when an instance of the class is destroyed
o
o

Private Constructor
o Private constructor in c# is used to restrict the class from being instantiated when
it contains every member as static.
o Private Constructor used for to restrict user to create object of class.

Static Constructor.
o Static constructor in c# is used to create static fields of the class and to write the
code that needs to be executed only once.

Copy Constructor.
o Copy constructor in c# is used to create new instance to the values of an existing
instance.
Constructor overloading
o In c# we can overload constructor by creating another constructor with
same method name and different parameters.
What is Interface
o An interface is not a class. It is an entity that is defined by the word
Interface. An interface has no implementation; it only has the signature or
in other words, just the definition of the methods without the body.
What is Generalization?
o

Question: What is application variable ?


Answer : application variable they help you to share the global data across all of
the users of the site.
Question: Synchronise process
Answer : Synchronise process is sequential process.

You might also like