Skip to content

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

@tutul2010

Description

@tutul2010

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions