mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Update React Music Store to RC2
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user