mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Update all projects for final .NET Core RC2
This commit is contained in:
@@ -29,8 +29,8 @@ namespace MusicStore.Apis
|
||||
await _storeContext.Artists.LoadAsync();
|
||||
|
||||
var albums = await _storeContext.Albums
|
||||
// .Include(a => a.Genre)
|
||||
// .Include(a => a.Artist)
|
||||
.Include(a => a.Genre)
|
||||
.Include(a => a.Artist)
|
||||
.ToPagedListAsync(page, pageSize, sortBy,
|
||||
a => a.Title, // sortExpression
|
||||
SortDirection.Ascending, // defaultSortDirection
|
||||
@@ -44,8 +44,8 @@ namespace MusicStore.Apis
|
||||
public async Task<ActionResult> All()
|
||||
{
|
||||
var albums = await _storeContext.Albums
|
||||
//.Include(a => a.Genre)
|
||||
//.Include(a => a.Artist)
|
||||
.Include(a => a.Genre)
|
||||
.Include(a => a.Artist)
|
||||
.OrderBy(a => a.Title)
|
||||
.ToListAsync();
|
||||
|
||||
@@ -74,17 +74,13 @@ namespace MusicStore.Apis
|
||||
await _storeContext.Artists.LoadAsync();
|
||||
|
||||
var album = await _storeContext.Albums
|
||||
//.Include(a => a.Artist)
|
||||
//.Include(a => a.Genre)
|
||||
.Include(a => a.Artist)
|
||||
.Include(a => a.Genre)
|
||||
.Where(a => a.AlbumId == albumId)
|
||||
.SingleOrDefaultAsync();
|
||||
|
||||
var albumResult = Mapper.Map(album, new AlbumResultDto());
|
||||
|
||||
// TODO: Get these from the related entities when EF supports that again, i.e. when .Include() works
|
||||
//album.Artist.Name = (await _storeContext.Artists.SingleOrDefaultAsync(a => a.ArtistId == album.ArtistId)).Name;
|
||||
//album.Genre.Name = (await _storeContext.Genres.SingleOrDefaultAsync(g => g.GenreId == album.GenreId)).Name;
|
||||
|
||||
// TODO: Add null checking and return 404 in that case
|
||||
|
||||
return Json(albumResult);
|
||||
@@ -147,7 +143,6 @@ namespace MusicStore.Apis
|
||||
public async Task<ActionResult> DeleteAlbum(int albumId)
|
||||
{
|
||||
var album = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId);
|
||||
//var album = _storeContext.Albums.SingleOrDefault(a => a.AlbumId == albumId);
|
||||
|
||||
if (album != null)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace MusicStore
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISPlatformHandlerUrl()
|
||||
.UseIISIntegration()
|
||||
.UseKestrel()
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"warningsAsErrors": true,
|
||||
"preserveCompilationContext": true
|
||||
},
|
||||
"runtimeOptions": {
|
||||
"gcServer": true
|
||||
},
|
||||
"tooling": {
|
||||
"defaultNamespace": "MusicStore"
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc2-*",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
||||
@@ -25,39 +31,26 @@
|
||||
"Microsoft.AspNetCore.AngularServices": "1.0.0-*",
|
||||
"AutoMapper": "4.1.1"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNetCore.Server.Kestrel"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": [
|
||||
"dotnet5.6",
|
||||
"dnxcore50",
|
||||
"portable-net451+win8"
|
||||
],
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-*",
|
||||
"type": "platform"
|
||||
}
|
||||
}
|
||||
"portable-net45+win8"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"wwwroot",
|
||||
"node_modules",
|
||||
"bower_components"
|
||||
],
|
||||
"publishExclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublish": [
|
||||
"npm install",
|
||||
"gulp"
|
||||
"publishOptions": {
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": [ "npm install" ],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace ES2015Example
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISPlatformHandlerUrl()
|
||||
.UseIISIntegration()
|
||||
.UseKestrel()
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
{
|
||||
"webroot": "wwwroot",
|
||||
"version": "1.0.0-*",
|
||||
"tooling": {
|
||||
"defaultNamespace": "ES2015Example"
|
||||
},
|
||||
"compilationOptions": {
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"warningsAsErrors": true,
|
||||
"preserveCompilationContext": true
|
||||
},
|
||||
"runtimeOptions": {
|
||||
"gcServer": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc2-3002702",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
||||
@@ -25,22 +30,12 @@
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": [
|
||||
"dotnet5.6",
|
||||
"dnxcore50",
|
||||
"portable-net451+win8"
|
||||
],
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-*",
|
||||
"type": "platform"
|
||||
}
|
||||
}
|
||||
"portable-net45+win8"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"wwwroot",
|
||||
"node_modules",
|
||||
"bower_components"
|
||||
],
|
||||
"publishExclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
@@ -49,8 +44,7 @@
|
||||
"**.vspscc"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublish": [
|
||||
"npm install"
|
||||
]
|
||||
"prepublish": [ "npm install" ],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,13 @@ namespace Webpack
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
|
||||
if (env.IsDevelopment()) {
|
||||
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions {
|
||||
HotModuleReplacement = true
|
||||
});
|
||||
}
|
||||
// For real apps, you should only use Webpack Dev Middleware at development time. For production,
|
||||
// you'll get better performance and reliability if you precompile the webpack output and simply
|
||||
// serve the resulting static files. For examples of setting up this automatic switch between
|
||||
// development-style and production-style webpack usage, see the 'templates' dir in this repo.
|
||||
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions {
|
||||
HotModuleReplacement = true
|
||||
});
|
||||
|
||||
app.UseStaticFiles();
|
||||
loggerFactory.AddConsole();
|
||||
@@ -41,7 +43,7 @@ namespace Webpack
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISPlatformHandlerUrl()
|
||||
.UseIISIntegration()
|
||||
.UseKestrel()
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"warningsAsErrors": true,
|
||||
"preserveCompilationContext": true
|
||||
},
|
||||
"runtimeOptions": {
|
||||
"gcServer": true
|
||||
},
|
||||
"tooling": {
|
||||
"defaultNamespace": "Webpack"
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc2-3002702",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
||||
@@ -22,41 +27,26 @@
|
||||
"Microsoft.Extensions.Logging.Debug": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.SpaServices": "1.0.0-*"
|
||||
},
|
||||
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNetCore.Server.Kestrel"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": [
|
||||
"dotnet5.6",
|
||||
"dnxcore50",
|
||||
"portable-net451+win8"
|
||||
],
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-*",
|
||||
"type": "platform"
|
||||
}
|
||||
}
|
||||
"portable-net45+win8"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"exclude": [
|
||||
"wwwroot",
|
||||
"node_modules",
|
||||
"bower_components"
|
||||
],
|
||||
"publishExclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublish": [
|
||||
"npm install"
|
||||
"publishOptions": {
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": [ "npm install" ],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace MusicStore.Apis
|
||||
await _storeContext.Artists.LoadAsync();
|
||||
|
||||
var albums = await _storeContext.Albums
|
||||
// .Include(a => a.Genre)
|
||||
// .Include(a => a.Artist)
|
||||
.Include(a => a.Genre)
|
||||
.Include(a => a.Artist)
|
||||
.ToPagedListAsync(page, pageSize, sortBy,
|
||||
a => a.Title, // sortExpression
|
||||
SortDirection.Ascending, // defaultSortDirection
|
||||
@@ -44,8 +44,8 @@ namespace MusicStore.Apis
|
||||
public async Task<ActionResult> All()
|
||||
{
|
||||
var albums = await _storeContext.Albums
|
||||
//.Include(a => a.Genre)
|
||||
//.Include(a => a.Artist)
|
||||
.Include(a => a.Genre)
|
||||
.Include(a => a.Artist)
|
||||
.OrderBy(a => a.Title)
|
||||
.ToListAsync();
|
||||
|
||||
@@ -74,17 +74,13 @@ namespace MusicStore.Apis
|
||||
await _storeContext.Artists.LoadAsync();
|
||||
|
||||
var album = await _storeContext.Albums
|
||||
//.Include(a => a.Artist)
|
||||
//.Include(a => a.Genre)
|
||||
.Include(a => a.Artist)
|
||||
.Include(a => a.Genre)
|
||||
.Where(a => a.AlbumId == albumId)
|
||||
.SingleOrDefaultAsync();
|
||||
|
||||
var albumResult = Mapper.Map(album, new AlbumResultDto());
|
||||
|
||||
// TODO: Get these from the related entities when EF supports that again, i.e. when .Include() works
|
||||
//album.Artist.Name = (await _storeContext.Artists.SingleOrDefaultAsync(a => a.ArtistId == album.ArtistId)).Name;
|
||||
//album.Genre.Name = (await _storeContext.Genres.SingleOrDefaultAsync(g => g.GenreId == album.GenreId)).Name;
|
||||
|
||||
// TODO: Add null checking and return 404 in that case
|
||||
|
||||
return Json(albumResult);
|
||||
@@ -147,7 +143,6 @@ namespace MusicStore.Apis
|
||||
public async Task<ActionResult> DeleteAlbum(int albumId)
|
||||
{
|
||||
var album = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId);
|
||||
//var album = _storeContext.Albums.SingleOrDefault(a => a.AlbumId == albumId);
|
||||
|
||||
if (album != null)
|
||||
{
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace MusicStore
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISPlatformHandlerUrl()
|
||||
.UseIISIntegration()
|
||||
.UseKestrel()
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"warningsAsErrors": true,
|
||||
"preserveCompilationContext": true
|
||||
},
|
||||
"runtimeOptions": {
|
||||
"gcServer": true
|
||||
},
|
||||
"tooling": {
|
||||
"defaultNamespace": "MusicStore"
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc2-*",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
||||
@@ -25,39 +31,26 @@
|
||||
"Microsoft.AspNetCore.ReactServices": "1.0.0-*",
|
||||
"AutoMapper": "4.1.1"
|
||||
},
|
||||
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNetCore.Server.Kestrel"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": [
|
||||
"dotnet5.6",
|
||||
"dnxcore50",
|
||||
"portable-net451+win8"
|
||||
],
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-*",
|
||||
"type": "platform"
|
||||
}
|
||||
}
|
||||
"portable-net45+win8"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"exclude": [
|
||||
"wwwroot",
|
||||
"node_modules"
|
||||
],
|
||||
"publishExclude": [
|
||||
"node_modules",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublish": [
|
||||
"npm install"
|
||||
"publishOptions": {
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": [ "npm install" ],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace ReactGrid
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISPlatformHandlerUrl()
|
||||
.UseIISIntegration()
|
||||
.UseKestrel()
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"warningsAsErrors": true,
|
||||
"preserveCompilationContext": true
|
||||
},
|
||||
"runtimeOptions": {
|
||||
"gcServer": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc2-3002702",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
||||
@@ -18,38 +24,26 @@
|
||||
"Microsoft.Extensions.Logging.Debug": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.ReactServices": "1.0.0-*"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNetCore.Server.Kestrel"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": [
|
||||
"dotnet5.6",
|
||||
"dnxcore50",
|
||||
"portable-net451+win8"
|
||||
],
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-*",
|
||||
"type": "platform"
|
||||
}
|
||||
}
|
||||
"portable-net45+win8"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"exclude": [
|
||||
"wwwroot",
|
||||
"node_modules"
|
||||
],
|
||||
"publishExclude": [
|
||||
"node_modules",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"scripts": {
|
||||
"prepare": [
|
||||
"npm install",
|
||||
"webpack"
|
||||
"publishOptions": {
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": [ "npm install" ],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user