Skip to content
This repository has been archived by the owner on Apr 11, 2021. It is now read-only.

Commit

Permalink
Core RC1, readme - Web API
Browse files Browse the repository at this point in the history
  • Loading branch information
christiannagel committed Mar 17, 2016
1 parent bbd7b38 commit 248d490
Show file tree
Hide file tree
Showing 67 changed files with 14,124 additions and 69,367 deletions.
2 changes: 1 addition & 1 deletion ASPNET/WebSampleApp/src/WebSampleApp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
loggerFactory.AddDebug();

// loggerFactory.AddConsole(Configuration.GetSection("Logging"));
//loggerFactory.AddConsole();
// loggerFactory.AddConsole();
// loggerFactory.AddDebug();


Expand Down
32 changes: 32 additions & 0 deletions ASPNET/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
ReadMe - Code Samples for Chapter 40, ASP.NET Core

The sample code for this chapter contains this solution:
- WebSampleApp

The version you downloaded is built using ASP.NET 5 RC1. The NuGet packages, namespaces, and a few code lines will change when RC2 is available.

You need to install the ASP.NET 5 tools in addtion to Visual Studio 2015.
Install the tools from here:
https://go.microsoft.com/fwlink/?LinkId=627627

After opening the files from Visual Studio, you might need to start the command prompt and download the necessary NuGet packages using
>dnu restore

If you have the .NET Core Command Line (CLI) Tools installed, you can use
>dotnet restore
instead.

Please download and install the .NET Core Command Line (CLI) Tools from https://github.com/dotnet/cli. For Windows, you will find an MSI package that you can install on your Windows system: https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-win-x64.latest.exe


When .NET Core RC2 is available, samples from this Chapter will be changed.
Please re-check the Wrox code downloads for updates.

Currently this are Microsoft's plans for RC2 and RTM:
8-Apr-2016 - RC2
30-Jun-2016 - RTM
Please check this link for Microsoft's actual schedule:
https://github.com/dotnet/corefx/milestones

Thank you!
Christian
33 changes: 33 additions & 0 deletions ASPNETMVC/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ReadMe - Code Samples for Chapter 41, ASP.NET MVC

The sample code for this chapter contains this solution:
- MVCSampleApp
- MenuPlanner

The version you downloaded is built using ASP.NET 5 RC1. The NuGet packages, namespaces, and a few code lines will change when RC2 is available.

You need to install the ASP.NET 5 tools in addtion to Visual Studio 2015.
Install the tools from here:
https://go.microsoft.com/fwlink/?LinkId=627627

After opening the files from Visual Studio, you might need to start the command prompt and download the necessary NuGet packages using
>dnu restore

If you have the .NET Core Command Line (CLI) Tools installed, you can use
>dotnet restore
instead.

Please download and install the .NET Core Command Line (CLI) Tools from https://github.com/dotnet/cli. For Windows, you will find an MSI package that you can install on your Windows system: https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-win-x64.latest.exe


When .NET Core RC2 is available, samples from this Chapter will be changed.
Please re-check the Wrox code downloads for updates.

Currently this are Microsoft's plans for RC2 and RTM:
8-Apr-2016 - RC2
30-Jun-2016 - RTM
Please check this link for Microsoft's actual schedule:
https://github.com/dotnet/corefx/milestones

Thank you!
Christian
12 changes: 1 addition & 11 deletions WebAPI/BooksServiceSample/BooksServiceSample.sln
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.25029.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{00B75FDC-B961-4332-A91C-E27D004EA515}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{515B7233-7440-4088-9309-9978C529A9B4}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BooksServiceSample", "src\BooksServiceSample\BooksServiceSample.xproj", "{135F3013-0B6B-40A9-8ADC-AD7EF5A8C716}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BookServiceClientApp", "src\BookServiceClientApp\BookServiceClientApp.xproj", "{4B49B48B-CB07-4937-A0BD-4962C9ED8400}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BookServiceAsyncSample", "src\BookServiceAsyncSample\BookServiceAsyncSample.xproj", "{50B32B42-1C50-424D-98F5-CD5DBBFF2695}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BooksServiceSampleRC1", "src\BooksServiceSampleRC1\BooksServiceSampleRC1.xproj", "{F4832AAA-BDDA-458F-8BD4-F02C26A09FE0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -36,10 +31,6 @@ Global
{50B32B42-1C50-424D-98F5-CD5DBBFF2695}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50B32B42-1C50-424D-98F5-CD5DBBFF2695}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50B32B42-1C50-424D-98F5-CD5DBBFF2695}.Release|Any CPU.Build.0 = Release|Any CPU
{F4832AAA-BDDA-458F-8BD4-F02C26A09FE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4832AAA-BDDA-458F-8BD4-F02C26A09FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4832AAA-BDDA-458F-8BD4-F02C26A09FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4832AAA-BDDA-458F-8BD4-F02C26A09FE0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -48,6 +39,5 @@ Global
{135F3013-0B6B-40A9-8ADC-AD7EF5A8C716} = {00B75FDC-B961-4332-A91C-E27D004EA515}
{4B49B48B-CB07-4937-A0BD-4962C9ED8400} = {00B75FDC-B961-4332-A91C-E27D004EA515}
{50B32B42-1C50-424D-98F5-CD5DBBFF2695} = {00B75FDC-B961-4332-A91C-E27D004EA515}
{F4832AAA-BDDA-458F-8BD4-F02C26A09FE0} = {00B75FDC-B961-4332-A91C-E27D004EA515}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNet.Mvc;
using BooksServiceSample.Models;

// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNet.Mvc;

namespace BookServiceAsyncSample.Controllers
{
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore;
//using Microsoft.EntityFrameworkCore;
using Microsoft.Data.Entity;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
//using Microsoft.EntityFrameworkCore;
//using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Metadata.Builders;
using System;

namespace BooksServiceSample.Models
Expand Down
21 changes: 6 additions & 15 deletions WebAPI/BooksServiceSample/src/BookServiceAsyncSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Data.Entity;
using BooksServiceSample.Models;
using Microsoft.EntityFrameworkCore;

namespace BookServiceAsyncSample
{
Expand All @@ -31,7 +31,8 @@ public async void ConfigureServices(IServiceCollection services)
services.AddMvc().AddXmlSerializerFormatters();
// uncomment the following three lines to use the SampleBookChaptersRepository
IBookChaptersRepository repos = new SampleBookChaptersRepository();
services.AddSingleton<IBookChaptersRepository>(repos);
// RC2 services.AddSingleton<IBookChaptersRepository>(repos);
services.AddInstance<IBookChaptersRepository>(repos);
await repos.InitAsync();

services.AddEntityFramework()
Expand All @@ -41,8 +42,6 @@ public async void ConfigureServices(IServiceCollection services)
);

services.AddSingleton<IBookChaptersRepository, BookChaptersRepository>();


}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand All @@ -59,14 +58,6 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
}

// Entry point for the application.
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseDefaultConfiguration(args)
.UseStartup<Startup>()
.Build();

host.Run();
}
public static void Main(string[] args) => WebApplication.Run<Startup>(args);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"server": "Microsoft.AspNetCore.Server.Kestrel",
"server": "Microsoft.AspNet.Server.Kestrel",
"server.urls": "http://localhost:5000"
}
46 changes: 18 additions & 28 deletions WebAPI/BooksServiceSample/src/BookServiceAsyncSample/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,31 @@
},

"dependencies": {
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
"Microsoft.AspNetCore.Mvc.Formatters.Xml": "1.0.0-*",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
"Microsoft.Extensions.Logging.Debug": "1.0.0-*",
"Microsoft.NETCore.Platforms": "1.0.1-*",
"Microsoft.EntityFrameworkCore": "1.0.0-*",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-*",
"Swashbuckle.SwaggerGen": "6.0.0-*",
"Swashbuckle.SwaggerUi": "6.0.0-*"
"EntityFramework.Core": "7.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
"EntityFramework.Commands": "7.0.0-rc1-final",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Mvc.Formatters.Xml": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"Swashbuckle.SwaggerGen": "6.0.0-rc1-final",
"Swashbuckle.SwaggerUi": "6.0.0-rc1-final"
},

"commands": {
"web": "BookServiceAsyncSample"
"web": "BookServiceAsyncSample",
"ef": "EntityFramework.Commands"
},

"tools": {
"dotnet-razor-tooling": "1.0.0-*",
"dotnet-ef": "1.0.0-*"
},

"frameworks": {
"dnxcore50": {
"dependencies": {
"NETStandard.Library": "1.0.0-*"
},
"imports": [ "dotnet5.6", "portable-net45+win8" ]
}
},

Expand All @@ -48,9 +42,5 @@
"publishExclude": [
"**.user",
"**.vspscc"
],
"runtimes": {
"win7-x64": { },
"win10-x64": { }
}
]
}

0 comments on commit 248d490

Please sign in to comment.