Update React Music Store to RC2

This commit is contained in:
SteveSandersonMS
2016-04-08 13:07:34 +01:00
parent 1f7ec8e4bf
commit e898ac974a
15 changed files with 93 additions and 100 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);

View File

@@ -1,8 +1,8 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using MusicStore.Models;
namespace MusicStore.Apis

View File

@@ -1,7 +1,7 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using MusicStore.Models;
using MusicStore.Infrastructure;

View File

@@ -1,5 +1,5 @@
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
namespace MusicStore.Models
{
@@ -7,7 +7,7 @@ namespace MusicStore.Models
public class MusicStoreContext : IdentityDbContext<ApplicationUser>
{
public MusicStoreContext()
public MusicStoreContext(DbContextOptions options) : base(options)
{
}

View File

@@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.OptionsModel;
using Microsoft.Extensions.Options;
namespace MusicStore.Models
{

View File

@@ -1,5 +1,5 @@
using Microsoft.AspNet.Http;
using Microsoft.Data.Entity;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;