Update MusicStore and Identity to remove workarounds

Fixes #10714
Fixes #10668
This commit is contained in:
Arthur Vickers 2019-06-18 10:25:18 -07:00
parent f56c4c1c33
commit 839cf89252
4 changed files with 6 additions and 6 deletions

View File

@ -503,8 +503,8 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
// TODO: Fix once EF query works Issue #10668
return Task.FromResult(Users.Where(u => u.NormalizedEmail == normalizedEmail).ToList().SingleOrDefault());
return Task.FromResult(Users.Where(u => u.NormalizedEmail == normalizedEmail).SingleOrDefault());
}
/// <summary>

View File

@ -636,8 +636,8 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
// TODO: Fix once EF query works Issue #10668
return Task.FromResult(Users.Where(u => u.NormalizedEmail == normalizedEmail).ToList().SingleOrDefault());
return Task.FromResult(Users.Where(u => u.NormalizedEmail == normalizedEmail).SingleOrDefault());
}
/// <summary>

View File

@ -36,6 +36,7 @@ namespace MusicStore.Controllers
{
// Retrieve Genre genre and its Associated associated Albums albums from database
var genreModel = await DbContext.Genres
.Include(g => g.Albums)
.Where(g => g.Name == genre)
.FirstOrDefaultAsync();
@ -44,8 +45,6 @@ namespace MusicStore.Controllers
return NotFound();
}
await DbContext.Entry(genreModel).Collection(g => g.Albums).LoadAsync();
return View(genreModel);
}

View File

@ -121,6 +121,7 @@ namespace MusicStore.Models
// the current price for each of those albums in the cart
// sum all album price totals to get the cart total
// No way to do decimal sum on server with SQLite, but client eval is fine here
return (await _dbContext
.CartItems
.Where(c => c.CartId == _shoppingCartId)