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:
5
src/ApplicationCore/Interfaces/IAggregateRoot.cs
Normal file
5
src/ApplicationCore/Interfaces/IAggregateRoot.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
namespace ApplicationCore.Interfaces
|
||||
{
|
||||
public interface IAggregateRoot
|
||||
{ }
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public interface IAppLogger<T>
|
||||
{
|
||||
void LogInformation(string message, params object[] args);
|
||||
void LogWarning(string message, params object[] args);
|
||||
}
|
||||
}
|
||||
|
||||
16
src/ApplicationCore/Interfaces/IAsyncRepository.cs
Normal file
16
src/ApplicationCore/Interfaces/IAsyncRepository.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ApplicationCore.Interfaces
|
||||
{
|
||||
public interface IAsyncRepository<T> where T : BaseEntity
|
||||
{
|
||||
Task<T> GetByIdAsync(int id);
|
||||
Task<List<T>> ListAllAsync();
|
||||
Task<List<T>> ListAsync(ISpecification<T> spec);
|
||||
Task<T> AddAsync(T entity);
|
||||
Task UpdateAsync(T entity);
|
||||
Task DeleteAsync(T entity);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace ApplicationCore.Interfaces
|
||||
{
|
||||
public interface IImageService
|
||||
{
|
||||
byte[] GetImageBytesById(int id);
|
||||
}
|
||||
}
|
||||
12
src/ApplicationCore/Interfaces/IOrderRepository.cs
Normal file
12
src/ApplicationCore/Interfaces/IOrderRepository.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using ApplicationCore.Entities.OrderAggregate;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ApplicationCore.Interfaces
|
||||
{
|
||||
|
||||
public interface IOrderRepository : IRepository<Order>, IAsyncRepository<Order>
|
||||
{
|
||||
Order GetByIdWithItems(int id);
|
||||
Task<Order> GetByIdWithItemsAsync(int id);
|
||||
}
|
||||
}
|
||||
10
src/ApplicationCore/Interfaces/IOrderService.cs
Normal file
10
src/ApplicationCore/Interfaces/IOrderService.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using ApplicationCore.Entities.OrderAggregate;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ApplicationCore.Interfaces
|
||||
{
|
||||
public interface IOrderService
|
||||
{
|
||||
Task CreateOrderAsync(int basketId, Address shippingAddress);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,14 @@
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ApplicationCore.Interfaces
|
||||
{
|
||||
|
||||
public interface IRepository<T> where T : BaseEntity
|
||||
{
|
||||
T GetById(int id);
|
||||
List<T> List();
|
||||
List<T> List(ISpecification<T> spec);
|
||||
IEnumerable<T> ListAll();
|
||||
IEnumerable<T> List(ISpecification<T> spec);
|
||||
T Add(T entity);
|
||||
void Update(T entity);
|
||||
void Delete(T entity);
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace ApplicationCore.Interfaces
|
||||
{
|
||||
Expression<Func<T, bool>> Criteria { get; }
|
||||
List<Expression<Func<T, object>>> Includes { get; }
|
||||
List<string> IncludeStrings { get; }
|
||||
void AddInclude(Expression<Func<T, object>> includeExpression);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ApplicationCore.Interfaces
|
||||
namespace ApplicationCore.Interfaces
|
||||
{
|
||||
|
||||
public interface IUriComposer
|
||||
{
|
||||
string ComposePicUri(string uriTemplate);
|
||||
|
||||
Reference in New Issue
Block a user