Initial Upgrade to .NET Core 2.0 (#50)
* Ardalis/upgrade1 (#44) * Upgrading to netcore 2.0 Updating repository to support async options and refactoring to use it. * Starting work on tracking customer orders feature. * Cleaning up some bugs Working on basket view component implementation * Fixing up styles, especially for basket in header. * Adding Order Features (#47) * Working on order model binding from checkout page - WIP * Small layout tweaks (#43) * Updating quantities implemented. * Fixed basket widget count * Order History (#49) * working on creating and viewing orders. * Working on wiring up listing of orders * List orders page works as expected. Needed to support ThenInclude scenarios. Currently using strings.
This commit is contained in:
@@ -15,15 +15,15 @@ namespace Microsoft.eShopWeb.Services
|
||||
{
|
||||
private readonly ILogger<CatalogService> _logger;
|
||||
private readonly IRepository<CatalogItem> _itemRepository;
|
||||
private readonly IRepository<CatalogBrand> _brandRepository;
|
||||
private readonly IRepository<CatalogType> _typeRepository;
|
||||
private readonly IAsyncRepository<CatalogBrand> _brandRepository;
|
||||
private readonly IAsyncRepository<CatalogType> _typeRepository;
|
||||
private readonly IUriComposer _uriComposer;
|
||||
|
||||
public CatalogService(
|
||||
ILoggerFactory loggerFactory,
|
||||
IRepository<CatalogItem> itemRepository,
|
||||
IRepository<CatalogBrand> brandRepository,
|
||||
IRepository<CatalogType> typeRepository,
|
||||
IAsyncRepository<CatalogBrand> brandRepository,
|
||||
IAsyncRepository<CatalogType> typeRepository,
|
||||
IUriComposer uriComposer)
|
||||
{
|
||||
_logger = loggerFactory.CreateLogger<CatalogService>();
|
||||
@@ -83,7 +83,7 @@ namespace Microsoft.eShopWeb.Services
|
||||
public async Task<IEnumerable<SelectListItem>> GetBrands()
|
||||
{
|
||||
_logger.LogInformation("GetBrands called.");
|
||||
var brands = _brandRepository.List();
|
||||
var brands = await _brandRepository.ListAllAsync();
|
||||
|
||||
var items = new List<SelectListItem>
|
||||
{
|
||||
@@ -100,7 +100,7 @@ namespace Microsoft.eShopWeb.Services
|
||||
public async Task<IEnumerable<SelectListItem>> GetTypes()
|
||||
{
|
||||
_logger.LogInformation("GetTypes called.");
|
||||
var types = _typeRepository.List();
|
||||
var types = await _typeRepository.ListAllAsync();
|
||||
var items = new List<SelectListItem>
|
||||
{
|
||||
new SelectListItem() { Value = null, Text = "All", Selected = true }
|
||||
|
||||
Reference in New Issue
Block a user