Tải bản đầy đủ (.doc) (12 trang)

Hướng dẫn sử dụng ASP NET MVC 3

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (246.58 KB, 12 trang )

ASP.NET MVC 3 Tools Update Release
Notes




 
 !"#$%&!' !"#$%&
&( !"#$%&#)
* &*+,-()
(* !"#$%&!'*.,/
!'$0123
!'4'567'567'56%3
!' "#"689:1;<93
!'=+;<91>
?1>
!"#$%&# !1
&6(@>11$&
Overview
#(+(4 !"#$%&#4%>1>
Note#((%( !"#$%&#$
#((;464 !"#$%&(A(
+6(+
!"#$%&49(($;%;&B$%&CD4E+
#( !"#$%&#(4F
• !"#$%&;
• !"#$%&%>1>
• !"#E+!;
• !"#E+!%>1>
• $!9$4"#B<C1
• (G,4%>1>(+406,


#(444(;4 !"#$%&+4( !"#
+(4HF
(DFIIII(I;;
Installation Notes
Important Note: Please make sure that all Visual Studio instances are closed before installing ASP.NET
MVC 3 Tools Update.
# !"#$%&#(E+!GBE+!C7(4
F
(DFIII+I6I,JK$%&
676(4 !"#$%&#4%>1>
4(4F
(DFIII49IJH9K>/1:>
!"#$%&#+;+6;( !"#$%&#4%
>1>466( !"#$%&#$76+6( !"#
$%&##((, !"#$%&
!"#$%&# !
&6(@>11$&
Software Requirements
#( !"#$%&;(4F
• "#89:
!"#$%&%>1>(4F
• %>1>%E+>1>",
Documentation
4 !"#$%&+($+(4HF
(DFIII49IJH9K>)212
#(4+ !"#$%&+($%&4( !"#
+(4HF
(DFIIII
Support
#(464+L(+4(

$+
44+(( !"#$%&47(+4(
!"#646+4F
(DFII4I11:M,
Upgrading an ASP.NET MVC 2 Project to ASP.NET MVC 3
#6, !"#$%&7(4F
1 &6 !"#$%&'6#('N
(4(
 &6(4N4( !"#$%&'(46
!"#$%&'OP64('56+64(
NB'56;1)1'CF
• 
!"#$%&# !
&6(@>11$&
• 
• 
• 
 &6(4(4(6 !"#$%&'(4
67(((6((QN
: 46 !"#$%&'676(N(
44(
) +(N( !"#$%&'7+6(( !"#$%&
8(4F
System.Web.Mvc, Version=2.0.0.0
((4F
System.Web.Mvc, Version=3.0.0.0
M Solu#on Explorer7(4B(((HH4
C7(4Bv3.0.0.0C
2 4 !#(+
(44F

• "#"$ % &'()$&'()  *$&
• "#"$ % &'()$&'()  $+,$&
/ Solu#on Explorer7(;9('Unload Project#((;9(
'Edit ProjectName.csproj
3 H() {F85E285D-A4E0-4152-9332-AB1D724D3325}(
{E53F8FEA-EAE0-44A6-8774-FFD645390401}
1> ((7(;9('7(Reload Project
11 (QN7(4L(
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
1 4('46(;6+( !"#$%&7(
4(((/(N(
(.0F
!"#$%&# !:
&6(@>11$&
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Changes in ASP.NET MVC 3 Tools Update
#(+(( !"#$%&#( !"#
$%&#$
"Add Controller" dialog box can now scaffold controllers with views and data access

code
-649646 ((
+766'Q
#((Add Controller+, !"#$%&7(;9(Controllers4Solu#on
Explorer79Add7(9Controller#(+,(+(-
-
!"#$%&# !)
&6(@>11$&
#((-++64
Empty Controller
#(6N#((9Add ac#ons
for create, edit, details, delete scenarios4 !"#$%&46((7
4(+
Controller with empty read/write actions
#(N((((+
((#((9Add ac#ons for create, edit, details, delete
scenarios4 !"#$%&46((74(+
Controller with read/write actions and views, using Entity Framework
#(+6969;64(
(47((4F
• 1 #(+9(("6
89&8(46(,,46(
!"#$%&# !M
&6(@>11$&
129(("689+8$
8(46(,32
• 0#( !"#$%&+4(
4+6#(+;
7((/4.5D+7
• 366 046N;;64;96(+6

7(;48,7
6(N(44"689&8F
public class Product
{
public int ProductId { get; set; }
[Required]
public string Name { get; set; }
// Product belongs to Category
public int CategoryId { get; set; }
public virtual Category Category { get; set; }
}
public class Category
{
public int CategoryId { get; set; }
[Required]
public string Name { get; set; }
}
E(6(-4(.7(
+'4(.
#(+(Add Controller+,8Model class76
(667(((64(++
F
• 46"689&876(6
• 46"689+8"689$87+(
6N6
8Data Context class769((F
• 46&8(,,7(<New data context…>R
,(+46
!"#$%&# !2
&6(@>11$&

• 46&8(,,7((+
(6(
• 46+8$87(6+',(
8Views7((67(None46P-6

O Advanced Op#ons 464(4(8,76
((6
Improvements to the "ASP.NET MVC 3 New Project" Dialog Box
#(+,6 !"#$%&'7
+
!"#$%&# !/
&6(@>11$&
New "Intranet Project" Template
#(Project TemplateIntranet Applica#on#(L
4++E(44(.
L(Q+'7(
N(4(9('9
4(Intranet Applica#on+($+(
4HF
(DFIII;I+6I2>B%3/C,
Project templates are now HTML5 enabled
#(;'+,S#$H);N4('
(+((S#$H)787
7987708
(4+S#$H);N#(7(
S#$H)'4($0+6B(,C
Project templates now include Modernizr 1.7
$0=+6(+4&S#$H)+(6
(4#(+6;<94 !"#
$%&'84+$07(DFII0I

Project templates include updated versions of jQuery, jQuery UI, and jQuery
Validation
#('(44('56F
• '561)1
• '56%1/
• '561/11
#(+;<9
Project templates now include ADO.NET Entity Framework 4.1 as a pre-installed
NuGet package
#( "#"689:1(&84&8
D4( "#"689((,+8
$8D
!"#$%&# !3
&6(@>11$&
&84N6!&B*&H+'*CD
%.&T#((+,++
+( N+1&0D+
U !
4&8 ( !"#$%&+( !"#+(
4HF
(DFIIIIIL;;(;;1;
(DFIII6;49II;;6;49;;;4;;;
;;
Project templates include JavaScript libraries as pre-installed NuGet packages
E(6 !"#$%&'7('(=N
6B4,7($0+6C+6(<46
((4('#(+6<
(((4(
8,7(464'567(4'56('
+4S7+'56<

976+N(<+,(4'56+
.'56(+(N7'56(
(78(4('56N(N(
+(+(7(6+6
(
Known Issues
• 764((V4(
B>,/>>2>M:CR84+(9(7?.
)1)MM
• #(-4-(946
(("6898,7+(P(
+6.7-(.(
• & !"#$%&'(4'./9(20
#(9( !"#$%&'(4((
(4
• 406,9((46((
94(0 !"#$%&7(
!"#$%&# !1>
&6(@>11$&
60(SSP+7((6(
(6
• 7("H +,6((
(
• E(60BNC74 !"#
$%&(42 !"#$%&640

• 46 !"#$%&4%E+",(%
7(%76 !"#$%&%
%E+",((+6( !"#$%&
#(46 !"#$%&4%(

(%E+",(%E+",
!"#$%&# !11
&6(@>11$&
Disclaimer
@>11$& (#(*;*4
,(7H(E+476(
(O+(94
#(6(6(666$
O66(4674
!"#$%&# !1
&6(@>11$&

×