Author: Marinko Spasojevic

React with .NET Core and MySQL – Form Validation and Handling POST Request

As a continuation of the previous part, we are going to implement form validation and to create a new owner entity by sending a POST request towards our .NET Core Web API server. In the CreateOwner component, we pass the handleChangeEvent() function to the Input component. We are going to use this function to enable two-way binding and to validate our input fields. Therefore, the implementation and sending POST request are what we aim for in this post. If you want to see all the basic instructions and complete navigation for the .NET Core series, check out the following link: Introduction...

Read More

How to Easily Create a PDF Document in ASP.NET Core Web API

Let’s imagine that we have a .NET Core Web API project in which we need to generate a PDF report. Even though it shouldn’t suppose to be too hard to do something like that, we could end up in losing too much time if we don’t know how to do it properly. In this article, we are going to show how to use the DinkToPDF library to easily generate PDF documents while working on the .NET Core Web API project. So, without further ado, let’s dive right into the fun part. You can download the source code for this article...

Read More

React with .NET Core and MySQL – Dynamic Form Creation and Modal Components

In this post, we are going to create a new form component for the post actions and modal components to display success and error messages. We are going to reuse them in every parent component that needs those modal components. Furthermore, we are going to create all the input fields from the config file dynamically, since we want to make our code reusable. So, let’s start. If you want to see all the basic instructions and complete navigation for the .NET Core series, check out the following link: Introduction to the .NET Core series. For the complete navigation and all the...

Read More

ASP.NET Core Web API Best Practices

While we are working on a project, our main goal is to make it work as it supposed to and fulfill all the customer’s requirements. But wouldn’t you agree that creating a project that works is not enough? Shouldn’t that project be maintainable and readable as well? It turns out that we need to put a lot more attention to our projects to write them in more readable and maintainable way. The main reason behind this statement is that probably we are not the only ones who will work on that project. Other people will most probably work on...

Read More

React with .NET Core and MySQL – Error Handling and Additional Components

Handling errors while sending HTTP requests towards our server is always a must. This is exactly what we are going to do in this blog post. If the server returns an error with the 404 or 500 status codes, we are going to redirect a user to a specific page. Handling errors which have status codes other than 404 or 500 are going to be executed by using the modal form components. We already have the page for the Not Found (404) error, so let’s continue with the creation of the Internal Server Error (500) component. If you want to...

Read More