Very basic of asp.net mvc with c#

12
ASP.NET MVC WITH C#

Transcript of Very basic of asp.net mvc with c#

Page 1: Very basic of asp.net mvc with c#

ASP.NET MVC WITH C#

Page 2: Very basic of asp.net mvc with c#

What is MVC?

Architectural Pattern Divide application into three logical part

Page 3: Very basic of asp.net mvc with c#

MVC Stands for

ModelViewController

Page 4: Very basic of asp.net mvc with c#

MVC Architecture

Model• Retrieves and

store data to database

View • User Interface(UI)

Controller

• Handles user interaction

• Works with model

• Select View to render

Page 5: Very basic of asp.net mvc with c#

Controller Classes

Controllers are a special class Interface between model and View Controller Class always will have ‘Controller’ in

the name Controllers contains action methods

Page 6: Very basic of asp.net mvc with c#

Snapshot of controller

Controller

Action Method

Page 7: Very basic of asp.net mvc with c#

Views

Views are simple Html, html helper etc Include CSS, Jquery library Partial Views

Page 8: Very basic of asp.net mvc with c#

Snapshot of View

Html helper with tag @html

Page 9: Very basic of asp.net mvc with c#

Model

Business Logic Database accessing logic etc

Page 10: Very basic of asp.net mvc with c#

Snapshot of Model

Page 11: Very basic of asp.net mvc with c#

Routing

Used to map browser request to controller action

Page 12: Very basic of asp.net mvc with c#

Thank you.