Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
Use extension method
Browse files Browse the repository at this point in the history
  • Loading branch information
asvishnyakov committed Oct 29, 2020
1 parent 48d2516 commit b513bb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions VirtoCommerce.Storefront/Domain/Cart/Demo/DemoCartBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public override async Task<bool> AddItemAsync(AddCartItem addCartItem)

protected override async Task AddLineItemAsync(LineItem lineItem)
{
var existingLineItem = Cart.Items.FirstOrDefault(li => li.ProductId.Equals(lineItem.ProductId, StringComparison.InvariantCulture)
&& (li.ConfiguredGroupId?.Equals(lineItem.ConfiguredGroupId, StringComparison.InvariantCulture) ?? true));
var existingLineItem = Cart.Items.FirstOrDefault(li => li.ProductId.EqualsInvariant(lineItem.ProductId)
&& (li.ConfiguredGroupId?.EqualsInvariant(lineItem.ConfiguredGroupId) ?? true));

if (existingLineItem != null)
{
Expand Down

0 comments on commit b513bb0

Please sign in to comment.