Model Binding In ASP.NET MVC

12
Presentation By : Ashutosh Mahto Mindfire Solutions Model Binding in ASP.Net MVC

description

This presentation would focus on Model binding in ASP. Net MVC. Will elaborate on how models are bound in ASP.Net MVC and how one can use custom model binding.

Transcript of Model Binding In ASP.NET MVC

Page 1: Model Binding In ASP.NET MVC

Presentation By :Ashutosh MahtoMindfire Solutions

Model Binding

in ASP.Net

MVC

Page 2: Model Binding In ASP.NET MVC

Model Binding in ASP.Net MVC

A brief information about MVC

Models in MVC

Binding data to views

Using Model Binding in MVC

View (Specific) Models in MVC

Custom model binding

Agenda to discuss

Page 3: Model Binding In ASP.NET MVC

Model Binding in ASP.Net MVC

Model-View-Controller

Separation of concerns

More control over rendered html

Better support for TDD and Unit Testing

Very flexible and extensible

Page 4: Model Binding In ASP.NET MVC

Model Binding in ASP.Net MVC

Model-View-Controller

Persistence mechanism in MVC

Representation of domain of application

Ensures data integrity and allows to flow through objects

Page 5: Model Binding In ASP.NET MVC

Model Binding in ASP.Net MVC

Binding data into Views

Action View

ViewData and ViewBag

Form parameters, Query string, Route Parameters

Binding in MVC without using Models

Page 6: Model Binding In ASP.NET MVC

Model Binding in ASP.Net MVC

Using Model binding in MVC Strongly typed

More control over data and less repetition of code

More flexible and extensible

Page 7: Model Binding In ASP.NET MVC

Model Binding in ASP.Net MVC

View (Specific) Models

Best suited when view needs to be associated with more data than an individual data model represents

Provides better flexibility and extensibility

Can reduce usage of ViewBags and ViewData

Page 8: Model Binding In ASP.NET MVC

Model Binding in ASP.Net MVC

Custom Model Binding

Page 9: Model Binding In ASP.NET MVC

Model Binding in ASP.Net MVC

Custom Model Binding

Steps -

Bind custom object using IModelBinder

Implement custom model binder

Page 10: Model Binding In ASP.NET MVC

Any Question ???

Model Binding in ASP.Net MVC

Page 11: Model Binding In ASP.NET MVC

Connect us at :

Model Binding in ASP.Net MVC

http://www.twitter.com/mindfires

http://www.mindfiresolutions.com

http://www.linkedin.com/company/mindfire-solutions

http://www.facebook.com/MindfireSolutions

Http://www.youtube.com/user/Mindfiresolutions

Page 12: Model Binding In ASP.NET MVC

Thank You !!!

Model Binding in ASP.Net MVC