Incomplete work on migrating Angular 2 Music Store sample to ASP.NET Core 1.0 RC2

This commit is contained in:
SteveSandersonMS
2016-04-05 12:19:01 +01:00
parent 1cb4dd920c
commit 507c4326ff
15 changed files with 85 additions and 116 deletions

View File

@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using AutoMapper;
using MusicStore.Models;
using MusicStore.Infrastructure;
@@ -97,7 +97,7 @@ namespace MusicStore.Apis
if (!ModelState.IsValid)
{
// Return the model errors
return HttpBadRequest(ModelState);
return BadRequest(ModelState);
}
// Save the changes to the DB
@@ -119,7 +119,7 @@ namespace MusicStore.Apis
if (!ModelState.IsValid)
{
// Return the model errors
return HttpBadRequest(ModelState);
return BadRequest(ModelState);
}
var dbAlbum = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId);