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:
26
src/ApplicationCore/Entities/BuyerAggregate/Buyer.cs
Normal file
26
src/ApplicationCore/Entities/BuyerAggregate/Buyer.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using ApplicationCore.Interfaces;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ApplicationCore.Entities.BuyerAggregate
|
||||
{
|
||||
public class Buyer : BaseEntity, IAggregateRoot
|
||||
{
|
||||
public string IdentityGuid { get; private set; }
|
||||
|
||||
private List<PaymentMethod> _paymentMethods = new List<PaymentMethod>();
|
||||
|
||||
public IEnumerable<PaymentMethod> PaymentMethods => _paymentMethods.AsReadOnly();
|
||||
|
||||
protected Buyer()
|
||||
{
|
||||
}
|
||||
|
||||
public Buyer(string identity) : this()
|
||||
{
|
||||
IdentityGuid = !string.IsNullOrWhiteSpace(identity) ? identity : throw new ArgumentNullException(nameof(identity));
|
||||
}
|
||||
}
|
||||
}
|
||||
11
src/ApplicationCore/Entities/BuyerAggregate/PaymentMethod.cs
Normal file
11
src/ApplicationCore/Entities/BuyerAggregate/PaymentMethod.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities;
|
||||
|
||||
namespace ApplicationCore.Entities.BuyerAggregate
|
||||
{
|
||||
public class PaymentMethod : BaseEntity
|
||||
{
|
||||
public string Alias { get; set; }
|
||||
public string CardId { get; set; } // actual card data must be stored in a PCI compliant system, like Stripe
|
||||
public string Last4 { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user