Commenting the external logins from login cshtml to work around a bug

https://github.com/aspnet/HttpAbstractions/issues/115

Also adding a work around for the EF issue.
This commit is contained in:
Praburaj 2014-09-10 11:26:29 -07:00
parent c41407d7b7
commit 0c3cf30d2c
2 changed files with 16 additions and 6 deletions

View File

@ -94,14 +94,23 @@ namespace MusicStore.Models
public int GetCount()
{
int sum = 0;
//https://github.com/aspnet/EntityFramework/issues/557
// Get the count of each item in the cart and sum them up
int? count = (from cartItems in _db.CartItems
where cartItems.CartId == ShoppingCartId
select (int?)cartItems.Count).Sum();
var cartItemCounts = (from cartItems in _db.CartItems
where cartItems.CartId == ShoppingCartId
select (int?)cartItems.Count);
cartItemCounts.ForEachAsync(carItemCount =>
{
if (carItemCount.HasValue)
{
sum += carItemCount.Value;
}
});
// Return 0 if all entries are null
return count ?? 0;
return sum;
}
public decimal GetTotal()

View File

@ -52,11 +52,12 @@
}
</section>
</div>
<div class="col-md-4">
@*https://github.com/aspnet/HttpAbstractions/issues/115*@
@*<div class="col-md-4">
<section id="socialLoginForm">
@await Html.PartialAsync("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl })
</section>
</div>
</div>*@
</div>
@section Scripts {
@*TODO : Until script helpers are available, adding script references manually*@