Refactoring Services (#61)
* Refactoring ViewModels into Razor Pages models * Cleaning up Basket viewcomponent * Refactoring services. Fixed bug in basket item counter.
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
using Microsoft.eShopWeb.RazorPages.ViewModels;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.eShopWeb.RazorPages.Interfaces
|
||||
{
|
||||
public interface IBasketService
|
||||
{
|
||||
Task<BasketViewModel> GetOrCreateBasketForUser(string userName);
|
||||
Task TransferBasketAsync(string anonymousId, string userName);
|
||||
Task AddItemToBasket(int basketId, int catalogItemId, decimal price, int quantity);
|
||||
Task SetQuantities(int basketId, Dictionary<string, int> quantities);
|
||||
Task DeleteBasketAsync(int basketId);
|
||||
}
|
||||
}
|
||||
11
src/WebRazorPages/Interfaces/IBasketViewModelService.cs
Normal file
11
src/WebRazorPages/Interfaces/IBasketViewModelService.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Microsoft.eShopWeb.RazorPages.ViewModels;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.eShopWeb.RazorPages.Interfaces
|
||||
{
|
||||
public interface IBasketViewModelService
|
||||
{
|
||||
Task<BasketViewModel> GetOrCreateBasketForUser(string userName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user