Asp.net core v1.0

Click here to load reader

  • date post

    19-Feb-2017
  • Category

    Software

  • view

    61
  • download

    2

Embed Size (px)

Transcript of Asp.net core v1.0

ASP.Net Core

ASP.Net CoreV1.0

Framework.Net Core.Net CoreASP.Net MVC 6: EFCore

FrameworkASP.Net Core.Net CoreFramework:.Net Core v1.0.Net Framework 4.5 up.Net CoreFramework,,:.Net core v1.0 -> coreFramework.Net Framework -> Full .Net Framework

Framework.Net Core:(,.NetJava)Full .Net Framework:.Net Framework,.Net Framework 4.6.2,.Net Framework

.Net Core:WindowsMac OSXLinuxFreeBSDAlpine.Net Core;,Nuget PackageNodeJs,NodeJs,.Net Native(Native)

Framework.Net Core,,.Net Core;.Net Core SDKFull .Net Framework.Net Framework,MonoUnix-Like

.Net Coredotnet new.Net(: project.json, Program.csNuget.config)dotnet restoreNugetdotnet builddotnet publish.Net(Runtime)dotnet run.Net(exe)dotnet repldotnet packNuget

.Net coreVisual Studio,:dotnet new t []

Yeoman(aspnet)

Yeoman aspnetsub-commandVisual Studio,,,Yeoman aspnet;:yo aspnet:[] []

(: ASP.Net MVCWebAPI Controller)yo aspnet:WebApiController ImageApiControllerGithub

.Net Core,,Http Request,

global.json

projects,,,SdkVisual Studio

wwwroot

Web,,Http Requestwwwroot

appsettings.json

json,Configuration,

Startup.cs

/IoC

: Program.cs

cmd.Net Core,,

: launchSettings.json

IDE:DevelopmentQAProductVisual Studio->,()

.Net Core:Http Request Handling flowMiddleware(Http Request Pipeline)Full .Net FrameworkNugetCommandLine(Development, QA, Product)ConfigurationLoggerSession

Startup.csStartupConfigureHttp Request Handling flow:

123Http Request Handling flow,flow,Middleware

MiddlewareHttp Request,Http Request Handling flowRequest/ResponseMiddlewareMiddleware,

.Net Core,.Net CoreRC,()

Command Line.Net Core()Node.Js,,Node.Js.Net CoreCI:dotnet restore()dotnet build()dotnet test()dotnet publish or pack( or )

.Net CorelaunchSettings.jsonASPNETCORE_ENVIRONMENT,(: appsettings,:appsettings.Development.json)

.Net CoreIoCStartupConfigureServices.Net Core:TrasientScopeSingleton

ConfigurationConfiguration,

Option pattern

,: Configuration([]:[])

Logger.Net Core,Logger,StartupConfigure,

ILoggerFactory

SessionSessionCache(SessionCache)StartupConfigureServiceCacheSessionSessionMvc.Net CoreSession,byte[](,)()

ASP.Net MVC 6ASP.Net MVC 6.Net CoreASP.Net MVC 6(MVC 7! (-_-) ~)MVC 6MVC 5,:Controller: POCO Controller, MVC/WebAPIView: ViewComponent, TagHelper, View InjectionRoute Attribute:

ControllerMVCWebApiController,: ControllerActionMVCView,:

POCO ControllerWebAPIControllerController:,(Public): ControllerController[NonController]

TagHelperHtml(element)(attribute)(reusable)_ViewImports.cshtml:

Entity Framework CoreEFAPI():Lazy Load(,)Connection Resiliency(,)Complexity Type(DDD)Spatial Type()Many-To-Many Relationship(!?)Inheritance support is not complete()Seeding(!?)GroupBy(GG)

EFCoreIn-Memory,EFCoreIn-Memory;

.Net Core:MSTestNunitXunitdotnet testdotnet test,package.jsontestRunner

Mock.Net Core,,Moq

.Net CoreWebHostBuilderWeb,:

Web