Download presentation
Presentation is loading. Please wait.
Published byReynold Hudson Modified over 9 years ago
1
ASP.NET 5 Visual Studio 2015 Templates Bill Wolff Rob Keiser June 10, 2015
2
ASP.NET 5 MVC 6 Unified programming model – Razor, WebAPI, Web Pages Tag helpers – Extend tag semantics – More readable, Angular style markup View components – Mini-controllers, replace @Html.Action() Service and type filters for IoC
3
VS 2013 Add Project VS 2013 – Web form – MVC – Web API
4
VS 2015 Add Project VS 2015 – 4.6 MVC 5 – 5 MVC 6
5
MVC 5 Solution These folders stay – Properties – References – Controllers – Models – Views These do not – App_Data, App_Start, Content, fonts, Scripts
6
MVC 6 Solution Items Project info Solution level settings Project to project references
7
MVC 6 Template Solution layout New folders – wwwroot Can rename – Dependencies – Compiler
8
MVC 5 Root Files These go away – Favicon Move to wwwroot – Global.asax – Packages.config Move to project.json – Startup.cs – Web.Config Appsettings, connection strings
9
MVC 6 Root files JSON configurations + CSharp – Bower: JS + CSS frameworks – Config: settings, connections – Gulpfile: client build tasks – MessageService: 2 factor auth email – Package: package versions – Project: dependencies, secrets, commands, frameworks, excludes, scripts – Startup: initialization code
10
MVC 5 Properties C# attributes
11
MVC 6 Properties AppSettings class
12
MVC 5 References Add assemblies
13
MVC 6 References.NET frameworks
14
MVC 5 App_Data, App_Start Local databases Startup code – Bundlers – Routes – Filters – Auth
15
MVC 5 Content, fonts, Scripts Content Fonts Scripts All move to wwwroot
16
MVC 6 wwwroot Static files – Styles – Images – Lib JavaScript frameworks CSS frameworks – Favicon Can rename
17
MVC 6 Dependencies JS build tools – Bower Client frameworks – NPM Node package manager
18
MVC 6 Compiler folder Razor pre-compilation MVC 5 > in csproj file – true
19
MVC 5 > MVC 6 Controllers folder Naming convention – Define IActionResults
20
MVC 6 Migrations folder EF code-first database – optional
21
MVC 6 Models folder Data model classes – Annotation hints
22
MVC 6 Views folder Sub folder per controller – _Global imports – _ViewStart sets layout
23
MVC 6 Razor views CSHTML pages
24
MVC 6 Razor shared _Layout _LoginPartial _ValidationScriptsPartial Errors
25
New: Environment tag Conditional per level Set library locations
26
MVC 5 Layout sections Bundle render Explicit ActionLink commands Partial pages Content placeholder Scripts at the end
27
MVC 6 Layout sections AppSettings inject New link tag helpers Async fragments Content placeholder Scripts at the end
28
MVC 6 Add a Page Copy an existing Razor view page – Or make a new one Rename the page Add a method to an existing controller Add menu link on _Layout page
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.