Fixing a nullreference exception
Also util files to start only "external containers"
This commit is contained in:
parent
decb87e0c6
commit
7521e7434d
17
docker-compose-external.override.yml
Normal file
17
docker-compose-external.override.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# docker-compose.override.yml is used to set up local configuration environment
|
||||||
|
# Things like the external ports to use or secrets/passwords depend on the
|
||||||
|
# specific deployment environment you might be using.
|
||||||
|
# Further details and docs: https://docs.docker.com/compose/extends/
|
||||||
|
#
|
||||||
|
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
sql.data:
|
||||||
|
environment:
|
||||||
|
- SA_PASSWORD=Pass@word
|
||||||
|
- ACCEPT_EULA=Y
|
||||||
|
ports:
|
||||||
|
- "5433:1433"
|
16
docker-compose-external.yml
Normal file
16
docker-compose-external.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# docker-compose.yml is used to set up the base config per container to be deployed
|
||||||
|
# Take into account that when deploying, this base configuration is merged with the
|
||||||
|
# configuration-per-environment specified at the docker-compose.override.yml
|
||||||
|
# Further details and docs: https://docs.docker.com/compose/extends/
|
||||||
|
#
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
sql.data:
|
||||||
|
image: microsoft/mssql-server-linux
|
||||||
|
|
||||||
|
basket.data:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- "6379:6379"
|
@ -1,5 +1,6 @@
|
|||||||
using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork;
|
using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
@ -12,11 +13,13 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.B
|
|||||||
|
|
||||||
private List<PaymentMethod> _paymentMethods;
|
private List<PaymentMethod> _paymentMethods;
|
||||||
|
|
||||||
public IEnumerable<PaymentMethod> PaymentMethods => _paymentMethods?.AsReadOnly();
|
public IEnumerable<PaymentMethod> PaymentMethods => _paymentMethods.AsReadOnly();
|
||||||
|
|
||||||
protected Buyer() { }
|
protected Buyer() {
|
||||||
|
_paymentMethods = new List<PaymentMethod>();
|
||||||
|
}
|
||||||
|
|
||||||
public Buyer(string identity)
|
public Buyer(string identity) : this()
|
||||||
{
|
{
|
||||||
if (String.IsNullOrWhiteSpace(identity))
|
if (String.IsNullOrWhiteSpace(identity))
|
||||||
{
|
{
|
||||||
@ -25,7 +28,6 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.B
|
|||||||
|
|
||||||
IdentityGuid = identity;
|
IdentityGuid = identity;
|
||||||
|
|
||||||
_paymentMethods = new List<PaymentMethod>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PaymentMethod AddPaymentMethod(int cardTypeId, string alias, string cardNumber, string securityNumber, string cardHolderName, DateTime expiration)
|
public PaymentMethod AddPaymentMethod(int cardTypeId, string alias, string cardNumber, string securityNumber, string cardHolderName, DateTime expiration)
|
||||||
|
1
start-external.ps1
Normal file
1
start-external.ps1
Normal file
@ -0,0 +1 @@
|
|||||||
|
docker-compose -f docker-compose-external.yml -f docker-compose-external.override.yml up
|
Loading…
x
Reference in New Issue
Block a user