This powerpoint supports my demonstration on how to get started with ASP.net core 1.0, MVC Core, and EF Core. We also walk through how to get .NET core installed on MAC OSX and deploy from there.
3. Joe Raio
Senior Technical Evangelist
DX Audience
Joe.Raio@Microsoft.com
joeraio.com
@joescars
About Me: Based in Ft. Lauderdale,
FL. Recently Married. I love Music,
Aviation and all things Technology
7. ASP.NET 2015 in a Nutshell
.NET Framework 4.6 .NET Core 1.0
Full .NET Framework for any scenario and
library support on Windows
Modular libraries & runtime optimized for
server and cloud workloads
8. What about ASP.NET 5?
ASP.NET Core 1.0 was previously called ASP.NET 5
It was renamed in January 2016
Announcement post
More details
You’ll still see it referred to as ASP.NET in Visual Studio and in some docs
Will be updated in next ASP.NET Core Release Candidate
9. Now MVC and Web API
are just features of
ASP.NET Core
10. ASP.NET Core 1.0
One set of concepts – remove duplication
Web UI and Web APIs
Smooth transition from Web Pages to MVC (future)
Built DI first
Runs on IIS or self-hosted
11. ASP.NET Core 1.0 – Key Values
Choose your Editors
and Tools
Open Source
with Contributions Cross-PlatformOSS
Seamless transition
from on-premises to cloud
Faster Development CycleTotally Modular
Fast
22. TagHelpers
HTML helpers expressed as tags
Ex. Instead of:
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
Write this:
<label asp-for="UserName" class="col-md-2 control-label"></label>
Easier to customize with additional attributes
Work seamlessly with the HTML editor
25. public interface ITagHelper
{
int Order { get; }
Task ProcessAsync(TagHelperContext context, TagHelperOutput output);
}
TagHelpers: Create Your Own
Examples:
https://github.com/aspnet/Mvc/tree/dev/src/Microsoft.AspNet.Mvc.TagHelpers
Key message: Differentiate the purpose and scenarios between .NET Framework and .NET Core. They Key point on .NET Core is that it’s self-contained and specialized on specific workloads. Make sure that we make the point that BOTH are valid. There is no decrease in investment on the .NET Framework side.
Transition. There is a common shared layer to these 2 pieces
ASP.net core is built for performance, scalability and to be cross platform. Web forms is not supported in asp.net core
Only support for c#
It’s easy to get started. Visit https://get.asp.net – Download the installer and you are ready to go!
From VS2015 all you do is go to File > New Project -> ASP.NET Web Application
Select Web Application under ASP.NET 5 Templates.
That’s it! It will now create your project
REFERENCE SNIPPETS.TXT
Let’s explore the project structure
i.global.json: This file is used to configure the solution as a whole. It includes just two sections, projects and sdk by default.
ii.References: This folder details the server-side references for the project which might be assemblies, NuGet packages, or projects.
iii.wwwroot: This special folder represents the actual root of the web app when running on a web server. Resources like images, script files and stylesheets are located inside this folder.
iv.Dependencies: This section contains two subfolders: Bower and NPM. These folders correspond to two package managers by the same names, and they’re used to pull in client-side dependencies and tool.
v.Migrations: This folder contains the Entity Frameworks migrations. This folder is added when the Individual User Accounts authentication option is selected during the configuration of the project template.
vi.Models: This folder will contain the classes that represent your application data.
vii.Controllers, ViewModels, Views and Services: These folders are related with ASP.NET MVC components. Except for the Controllers folder, these folders are added when the Individual User Accounts authentication option is selected during the configuration of the project template. You will explore the MVC and Web API technologies in the next exercises.
viii.appsettings.json: This file contains the configurations like connection strings and logging levels.
ix.gulpfile.js: This file contains the Gulp tasks for the project.
x.project.json: This file is used to define the project’s server side dependencies, as well as other project-specific information.
xi.Startup.cs: class file wires up configuration, MVC, EF, Identity services, logging, routes, and more. It provides a good example for how to configure the services used by your ASP.NET app.