Tag: Dungeons and dragons
Why you should use a DTO to send to your API instead of the class itself
IWhen I first started putting together the API for my dnd app, I was just using whatever model I had on the backend as the expected argument from the body. This worked fine for basic stuff, but eventually I ran into a problem. Take a look at my location class: In it, I say that… Read more
How to change from a string input to an enum input using an an Angular app sending to a C# API
Lets say you have a class that needs to use an enum, for instance in dungeons and dragons, you have a monster class that is going to have an alignment. Defining the enum is simple enough, define the enum Now, change where you were previously using a string input to an alignment input Change the… Read more
Updating Data in a form between an Angular App and an API written in C#
If you have data in a form and you need to change the value of that data and save it off to a database, like the Azure SQL database I am using for my project, here’s a quick guide: Starting with the monster data in a form from the previous post: We need to be… Read more