Subscriptions-DDD icon indicating copy to clipboard operation
Subscriptions-DDD copied to clipboard

showing an exception on POST call of an endpoint in after-Subscriptions code repo

Open tutul2010 opened this issue 1 year ago • 0 comments

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, image

Can you please help me to fix it on after code repo ?

Thanks,

tutul2010 avatar Sep 06 '23 08:09 tutul2010