The problem I had with APIs and Inheritance in .NET

And how to easily solve it

Ivan Stoev
Level Up Coding
Published in
2 min readJan 17, 2022

--

Photo by rupixen.com on Unsplash

So here's the problem I had. I had an endpoint in my OrderController that had to add an order, similar to the following (I will be using a short example for the purpose of keeping this short and sweet):

--

--