Code Maze Author

Marinko Spasojević

Hi, my name is Marinko Spasojevic. Currently, I work as a full-time .NET developer and my passion is web application development. Just getting something to work is not enough for me. To make it just how I like it, it must be readable, reusable, and easy to maintain. Prior to being an author on the CodeMaze blog, I had been working as a professor of Computer Science for several years. So, sharing knowledge while working as a full-time developer comes naturally to me.
Also find me here:


MY ARTICLES:

Angular Components and 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...

POST, PUT, and DELETE in ASP.NET Core Web API

A write action in an ASP.NET Core Web API does four things: it accepts a DTO from the request body, validates it, asks the repository to stage the change, and returns a status code that tells the client what happened. POST returns 201 Created, PUT and DELETE return...

ASP.NET Core Web API GET Requests With a Repository

A controller action in an ASP.NET Core Web API does three things: it matches a route, it asks a repository for data, and it returns that data with a status code. Everything else belongs somewhere other than the controller. In this part we build the three GET endpoints...

Repository Pattern in .NET Core Web API

The repository pattern puts one layer between the code that needs data and the code that talks to the database. Controllers call IOwnerRepository; only the repository knows that EF Core is underneath. In this part we build that layer for our ASP.NET Core Web API: the...

NLog in ASP.NET Core Web API: Logging to a File

ASP.NET Core ships logging in the box. We inject ILogger<T> into a class, call it, and the messages go wherever the registered providers send them: the console by default, and nowhere durable. NLog is one of those providers, and it is the one that writes files....

SQL Server With ASP.NET Core: Creating the Database

The ASP.NET Core Web API we build across this series reads and writes two SQL Server tables: Owner, holding a person, and Account, holding the accounts that person owns. One owner has many accounts, and that single relationship is the whole data model. This part...