It's Friday again. It's time to walk fast. With the help of joans this week, I started to learn mvc3. After four days of viewing data, I had a simple understanding of mvc3. Knowledge of mvc3 includes: C #, razor, HTML, CCS, JavaScript, jquery, and Entity Framework.
The learning process is as follows:
Step 1: Build the mvc3 Environment
Vs2010 has already been installed on my computer, and mvc3 and SQL server2008 can be directly installed.
Step 2: view documents
First, I went to http://www.w3school.com.cn/and finally understood HTML, CCS, JavaScript, and jquery, but the thinking was chaotic and confused: How can I apply them to mvc3?
Finally, I think it is necessary to first understand mvc3 and then learn the knowledge points involved in using mvc3 step by step.
Step 3: Learn mvc3 based on the specific instance
We can see that joans's blog vs2010, MVC2 and EF (Entity Framework) Implement addition, deletion, and modification of instances, which are detailed and specific, so we started to follow her steps step by step. At the beginning, it was not easy to draw a gourd Based on the gourd!
I have never touched on databases before, so it takes only one and a half days to create a database.
Next, I thought it would be quite smooth, but there was always a problem. When I added the view, I couldn't find the site when I used a layout or master page. master file, which has not been solved after a long time, so I asked joans for help to know that mvc3 was not fully compatible with MVC2. When addview is in mvc3, 1
Figure 1
The view engine used by mvc3 is razor. When using a layout or master page, it is marked by the red box in _ layout. cshtml and 1.
the razor template engine is fully used in mvc3. Therefore, you must learn the razor syntax. Next, let's look at the razor syntax.