ASP. NET MVC5 getting started and mvc5 getting started

Source: Internet
Author: User

ASP. NET MVC5 getting started and mvc5 getting started

This tutorial is based on the tutorials published by the grape city control technical team (Sina Weibo @ grape city control) Translation editor for self-practice and consolidation.

The first lesson of the company, under the guidance of the master, has a certain entry Foundation, and will later learn the bootstrap content and MVC5 exercises.

The following is an introduction to Baidu cloud disk sorting for your reference.

Link: http://pan.baidu.com/s/1gfwMjRl password: xmwk

The following documents are based on the word content. For details, refer to the word content.

Software-based: VS2013

Bootstrap Web site: http://www.bootcss.com/

Bootstrap Tutorial: http://www.dnzs.com.cn/w3cschool/bootstrap/bootstrap-tutorial.html

2. EF-CodeFirst access the data model from the Controller

Use Entity Framework to automatically create a database

Advantage: Code-first, automatically generated

Disadvantage: Data Initialization is caused by database migration.

2.1IDE concept:

Integrated Development Environment (IDE, Integrated Development Environment) is an application used to provide a program Development Environment, generally including code editor, compiler, debugger and graphical user interface tools. It integrates the code writing function, analysis function, compilation function, debugging function, and other integrated development software service sets. All software or software kits (groups) with this feature can be called integrated development environments. Such as Microsoft's Visual Studio series, Borland's C ++ Builder, and Delphi series. The program can run independently or with other programs. IDE is mostly used to develop HTML applications. For example, many people use IDE (such as HomeSite and DreamWeaver) when designing websites because many tasks are automatically generated.

2.2 create an MVC5 application 2.2.1

ClickCreate a project, SelectVisual C #And then selectWebAnd then selectASP. NET Web Application. Name your project as "MvcMovie", and then clickOK.

2.2.2

InNew ASP. NET ProjectDialog box, selectMVCTemplateAnd then clickOK.

...

2.3MVC Concept

MVC: Models-view Views-controller Controllers.

MVC is a well-structured and easy-to-test and easy-to-maintain development model. MVC-based applications include:

Models:IndicatesDataAnd useVerification LogicTo enforce business rules.

Views:The application dynamically generatesTemplate File.

Controllers: Process browser requests,Get Data ModelAnd then specify the View template (return View () to respond to the browser request ()).

 

 

2.4 Add a controller 2.4.1

First, let's create a controller class. InSolution Resource Manager, Right-clickClick the Controller folder (Controllers)And then select"Add Controller".

2.4.2

AddScaffoldDialog box, clickMVC 5Controller-NullAnd then clickAdd".

2.4.3

Name the new controller as "HelloWorldController" and click "add".

...

3. DbSet ing database 3.1Sql server Remote Connection database

Use a blog as an example to connect to the server data ADO. NET Entity Framework

3.1.1 create a project-c # -web-asp.net web application-MVC

...

3.2 connect to the local database 3.2.1 crack navicat

Copy the pathnavicat.exe program to the navicat premium installation directory and click "successfully" before enabling navicat.

...

For more information, see Baidu cloud disk.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.