Outline

Solution: Fix Add Comment To Article

Based on the error I see it turns out to be a mapping issue. Let's go look at the code so you can see what I'm talking about.

We'll need to add the configuration in the Startup.cs file. Let's find the Auto Mapper Configuration Section and add it to the bottom.

You would think that we need another mapping between the Person and the Author. However, remember that the Author is a User Profile. We already have the Mapping Configuration in place for that.

Let's test it and see if it works.

I feel like I should just fill in the silence with a story or maybe a joke since you already know that I need to login using a different identity from the Author of the Article.

I need to find a slug I can copy so I can use it for when I make the comment.

I'll head on over to Post a Comment. I'll put something cheesy and execute it.

And there you have it! A 200 Success response and a smile on your face because it worked!

Next up, We'll get comments from an Article.

 

I finished! On to the next chapter