Subscriptions-DDD
Subscriptions-DDD copied to clipboard
showing an exception on POST call of an endpoint in after-Subscriptions code repo
HI , I tried to call endpoints in Post call with below request load and popup a runtime error as "System.NullReferenceException: Object reference not set to an instance of an object. at Subscriptions.Domain.Customer.AddSubscription(Product product, ISubscriptionAmountCalculator subscriptionAmountCalculator) in D:\learning\ddd_sample\Subscriptions-DDD\Subscriptions\Domain\Customer.cs:line 36"
Endpoints - https://localhost:5001/subscriptions
Verb- Post
Request payload(as json) -
{
"CustomerId": "4D2ECE0D-4CDC-4CDC-8315-53AB89B4F05D",
"ProductId": "7D037E64-53AA-4BC3-BAF1-F8480F585969"
}
Below attached error runtime exception as below,
Can you please help me to fix it on after code repo ?
Thanks,