diff --git a/AspNetBlog/global.json b/AspNetBlog/global.json index 84b0e87..819aff3 100644 --- a/AspNetBlog/global.json +++ b/AspNetBlog/global.json @@ -1,6 +1,6 @@ { "projects": [ "src", "test" ], "sdk": { - "version": "1.0.0-beta6" + "version": "1.0.0-beta7" } } diff --git a/AspNetBlog/src/AspNetBlog/Startup.cs b/AspNetBlog/src/AspNetBlog/Startup.cs index 1b68b50..e2cebfb 100644 --- a/AspNetBlog/src/AspNetBlog/Startup.cs +++ b/AspNetBlog/src/AspNetBlog/Startup.cs @@ -8,7 +8,7 @@ using Microsoft.Framework.Configuration; using Microsoft.Data.Entity; using Microsoft.AspNet.Identity.EntityFramework; -using Microsoft.Framework.Runtime; +using Microsoft.Dnx.Runtime; namespace AspNetBlog { @@ -34,8 +34,8 @@ public void ConfigureServices(IServiceCollection services) services.AddScoped(); services.AddTransient(); - string blogDataConnectionString = config.Get("Data:BlogData:ConnectionString"); - string identityConnectionString = config.Get("Data:Identity:ConnectionString"); + string blogDataConnectionString = config["Data:BlogData:ConnectionString"]; + string identityConnectionString = config["Data:Identity:ConnectionString"]; services.AddEntityFramework() .AddSqlServer() @@ -50,9 +50,9 @@ public void ConfigureServices(IServiceCollection services) public void Configure(IApplicationBuilder app) { - var password = config.Get("password"); + var password = config["password"]; - if (config.Get("RecreateDatabase") == "true") + if (config["RecreateDatabase"] == "true") { var context = app.ApplicationServices.GetService(); context.Database.EnsureDeleted(); @@ -62,7 +62,7 @@ public void Configure(IApplicationBuilder app) app.UseIdentity(); - if (config.Get("debug") == "true") + if (config["debug"] == "true") { app.UseErrorPage(); app.UseRuntimeInfoPage(); diff --git a/AspNetBlog/src/AspNetBlog/project.json b/AspNetBlog/src/AspNetBlog/project.json index c300126..919f35c 100644 --- a/AspNetBlog/src/AspNetBlog/project.json +++ b/AspNetBlog/src/AspNetBlog/project.json @@ -4,17 +4,17 @@ "version": "1.0.0-*", "dependencies": { - "Microsoft.AspNet.Server.IIS": "1.0.0-beta6", - "Microsoft.AspNet.Server.WebListener": "1.0.0-beta6", - "Microsoft.AspNet.StaticFiles": "1.0.0-beta6", - "Microsoft.AspNet.Mvc": "6.0.0-beta6", - "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta6", - "EntityFramework.SqlServer": "7.0.0-beta6", - "Microsoft.AspNet.Diagnostics": "1.0.0-beta6", - "Microsoft.Framework.Configuration": "1.0.0-beta6", - "Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta6", - "Microsoft.Framework.Configuration.Json": "1.0.0-beta6", - "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta6" + "Microsoft.AspNet.Server.IIS": "1.0.0-beta7", + "Microsoft.AspNet.Server.WebListener": "1.0.0-beta7", + "Microsoft.AspNet.StaticFiles": "1.0.0-beta7", + "Microsoft.AspNet.Mvc": "6.0.0-beta7", + "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta7", + "EntityFramework.SqlServer": "7.0.0-beta7", + "Microsoft.AspNet.Diagnostics": "1.0.0-beta7", + "Microsoft.Framework.Configuration": "1.0.0-beta7", + "Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta7", + "Microsoft.Framework.Configuration.Json": "1.0.0-beta7", + "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta7" }, "commands": { diff --git a/README.md b/README.md index 3a3a5c9..c58a8f9 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,32 @@ Demo source code and links for Lynda.com Up and Running with ASP.NET 5 training ## Exercise File versions * __1.0.0-beta4__ *(what is shown in the videos)*__:__ [Sample application code](https://github.com/jchadwick/UpAndRunningWithAspNet5/tree/beta4/AspNetBlog) * __1.0.0-beta6__: [Sample application code](https://github.com/jchadwick/UpAndRunningWithAspNet5/tree/beta6/AspNetBlog) +* __1.0.0-beta7__: [Sample application code](https://github.com/jchadwick/UpAndRunningWithAspNet5/tree/beta7/AspNetBlog) ## Release Notes +### beta4 to beta7 [(Full file comparison)](https://github.com/jchadwick/UpAndRunningWithAspNet5/compare/beta4...beta7) + +__Updated Tooling__ +* Download and install: [Microsoft.NET and Web Tools 2015 (Beta7)](http://www.microsoft.com/en-us/download/details.aspx?id=48738&WT.mc_id=rss_alldownloads_devresources) + +__Namespace/Library changes__ +* `Microsoft.Framework.ConfigurationModel` renamed to `Microsoft.Framework.Configuration` +* `Microsoft.Framework.Runtime` renamed to `Microsoft.Dnx.Runtime` + +__API changes__ +* __Configuration__ + * *[Startup.cs: line 21]* Must use `ConfigurationBuilder` instead of `Configuration` to create configuration objects + * *[Startup.cs: line 21]* New `ConfigurationBuilder` requires base path for configuration files; inject `IApplicationEnvironment` into the `Startup` constructor *[Startup.cs: line 19]* and call `IApplicationEnvironment.ApplicationBasePath` + * *[Startup.cs: line 26]* Must call `.Build()` after adding configuration sources to generate configuration object + * *[Startup.cs: lines 55, 65]* `IConfiguration.Get()` no longer offered - must use array indexer, which returns a string +* __Entity Framework__ + * *[BlogDataContext.cs: line 36]* `ModelBuilder.ForSqlServer()` extension no longer provided/required - removed entire extraneous section +* __Identity__ + * *[AccountController.cs: line 58]* Synchronous version of `SignInManager.SignOut()` no longer offered - must use `.SignOutAync()`. + *Also converted the controller action to an async action, though this is not required* + + ### beta4 to beta6 [(Full file comparison)](https://github.com/jchadwick/UpAndRunningWithAspNet5/compare/beta4...beta6) __Namespace/Library changes__