Fixing bug in GetCartAlbumTitles
This commit is contained in:
parent
6aea6541d0
commit
2080a9776e
|
|
@ -23,7 +23,7 @@ namespace MusicStore.Components
|
||||||
var cartItems = await cart.GetCartAlbumTitles();
|
var cartItems = await cart.GetCartAlbumTitles();
|
||||||
|
|
||||||
ViewBag.CartCount = cartItems.Count;
|
ViewBag.CartCount = cartItems.Count;
|
||||||
ViewBag.CartSummary = string.Join("\n", cartItems);
|
ViewBag.CartSummary = string.Join("\n", cartItems.Distinct());
|
||||||
|
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,6 @@ namespace MusicStore.Models
|
||||||
.CartItems
|
.CartItems
|
||||||
.Where(cart => cart.CartId == _shoppingCartId)
|
.Where(cart => cart.CartId == _shoppingCartId)
|
||||||
.Select(c => c.Album.Title)
|
.Select(c => c.Album.Title)
|
||||||
.Distinct()
|
|
||||||
.OrderBy(n => n)
|
.OrderBy(n => n)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue