Programación Mvc 3

Páginas: 35 (8600 palabras) Publicado: 7 de agosto de 2012
Getting started
with MVC3
By Scott Hanselman
This document is an unofficial printable version of ASP.NET MVC 3
tutorial written by Scott Hanselman. This document is free and was
edited by Gustavo Azcona to be shared with the developer community.
It’s provided "as is" without warranty of any kind. Enjoy it!

0

Getting started with MVC3

Page | 1

Contents
Intro to ASP.NET MVC 3......................................................................................................................................................... 3
What You'll Build ............................................................................................................................................................... 3
Skills You'll Learn........................................................................................................................................................... 5
Getting Started ............................................................................................................................................................. 5
Creating Your First Application.......................................................................................................................................... 6
Adding a Controller ......................................................................................................................................................... 10
Adding a View................................................................................................................................................................. 15
Changing Views and Layout Pages ............................................................................................................................... 20
Passing Data from the Controller to the View .............................................................................................................. 23
Adding a Model............................................................................................................................................................... 28
Using NuGet to Install EFCodeFirst .............................................................................................................................. 28
Adding ModelClasses.................................................................................................................................................. 32
Accessing your Model's Data from a Controller ................................................................................................................ 35
Strongly typed Models and the @model keyword........................................................................................................ 37Creating a Connection String and Working with SQL Server Express ............................................................................. 40
Adding a Create Method and Create View ....................................................................................................................... 47
Displaying the Create Form......................................................................................................................................... 47
Processing the HTTP-POST........................................................................................................................................... 52
Creating a Movie......................................................................................................................................................... 54
Adding a New Field to the Movie Model and Table .......................................................................................................... 57
Adding a Rating Property to our Movie Model ............................................................................................................. 57
Managing Model / Database Schema Differences...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Apuntes MVC 3
  • Programacion 3
  • programacion 3
  • 3 Pilares de programacion
  • Curso de Programación 3
  • Práctica de Programación 3 UNED
  • Programacion 2-3 años
  • Programación Lineal Ejercicio 3

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS