Author: Marinko Spasojevic

Angular – Angular Project Preparation

Angular project preparation can vary from project to project and from version to version, and this article is dedicated to that topic. Creating the server part (.NET Core Web API part) is just half of the job we want to accomplish. From this point onwards, we are going to dive into the client side of the application to consume the Web API part and show the results to the user by using angular components and many other features. If you want to see all the basic instructions and complete navigation for the .NET Core series, check out the following link: Introduction of...

Read More

ASP.NET Core Web API – Post, Put, Delete

In the previous post, we have handled different GET requests with the help of a DTO object. In this post, we are going to create POST PUT DELETE requests and by doing so we are going to complete the server part (.NET Core part) of this series. Let’s get into it. Creating a Database for Our Project Basic Code Preparations Logging with NLog in ASP.NET Core Repository Pattern with Entity Framework Core How to Handle Get Request Using Repository for POST, PUT and DELETE Requests (Current article) This article is part of the series If you want to see...

Read More

ASP.NET Core Web API – How to Handle Get Request

The Get Request is something we can’t miss while creating API because it is the most common request. So, it is very important to learn more about handling that kind of request. In the previous post, we have created a repository pattern for collecting the data from the database. Now, it is time to use that repository for the business logic. We are going to keep all the database logic inside the repository classes. Controllers will be responsible for handling requests, model validation and returning responses to the frontend part of the application. By doing so, our controllers won’t...

Read More

ASP.NET Core Web API – Repository Pattern

What is a Repository pattern and why should we use it? With the Repository pattern, we create an abstraction layer between the data access and the business logic layer of an application. By using it, we are promoting a more loosely coupled approach to access our data from the database. Also, the code is cleaner and easier to maintain and reuse. Data access logic is in a separate class, or sets of classes called a repository, with the responsibility of persisting the application’s business model. Implementing the repository pattern is our topic for this post. Additionally, this article has a...

Read More

ASP.NET Core Web API – Logging With NLog

Why is logging so important during the application development? Well, while your application is in the developing stage it is very easy to debug the code and to find out what went wrong. But, can you debug in the production environment? Of course not.  That is why logging messages are a great way to find out what went wrong and where did errors happen in your code in the production environment. .NET Core has its own implementation of logging messages, but in all my projects, I prefer to create my own custom logger service.  This is what we are...

Read More

Widget1