Friday, May 1, 2015
What's new in asp.net 5
updates for asp.net 4.6, web forms mvc5
roslyn support. .net compiler
roslen c# languae fature
var name="ss"
var messgage=$"this is a amessag {name}"
Features
totally modular
>old days, all features on. now , you can turn on off , faster
>cloud support
>faster dev cycle. 2 seconds to compiler
>cross platform. run on mac, linux, windows
>faster. less memory
docs.asp.net
powerd by readthedocs, markdown syntax
readmedocs.org
1. turn on featues on and off, moduleer. can run on IoT
//like the nodejs
public void configure(IapplicationBuild app)
{
app.run(async (context)=>
{
await context.Response.WriteAsync("Hello World")
})
}
//add dependency .microsfot.aspnet.diagnostis
app.userErrorPage();
dnx . web //start the app
//not static handler by default. need add dependency
//add dependency
microsoft.aspnet.staticfiles
app.useStatiffiles (); // extension methods
2. roslyn engine
instead of compile cs to dll, then load it.
now load it in memory
DNX (Dontne Execution Environment)
4.5.1
5.0 core
old file have the csproj, inclue all files. cause merge issues.
now all fiels in the project
commands in package.json
like alias in npm
dnx . web //run web command in the folder.
target framework
frameworks:{
dnx451:{}
dnxcore50:{}
}
bower support
>>>nuget not versioned
gulp support
task runner support (show gupp task)
>before build
>after build
publish the app to a disk and can run it directly. by run the web.command
3.Environment
<Environment names="Dev">
<link rel="stylesheet" href="cdnlink" asp-fall-back-ref="otherlinks">
</Environment>
model injection.
more html
<input asp-for="email" class="form-control"/>
used to be html.Textbox(m->m.Email, new {"classs=formcontrol"})
4. configuration.
new Configuration().addInifile() or addjson()
app.addUserSecretcs(), no connectionstring in web.config.
also for hosted on cloud, IT ops will asign those value
user-script //
user-script set AppSettings:SiteTitle "sec title"
5. controller
new ScrottController () , no need for base calss
public xxxController()
{
public string Index()
{
return "hello, index"
}
}
6.dotnet version manager
dnvm list
c:\users\currentuser\.dnx
7. mac
yo asp.net
dnu restore
dnx run kestrol
Mcirosfot.aspnet.serverhosting -server kestrol
8. run on rsp pi
kestrel
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment