Latest Posts On Code Maze

How to Send an Email in ASP.NET Core

How to Send an Email in ASP.NET Core

In this article, we are going to learn how to send an email in ASP.NET Core. We are going to start with simple project creation and creating a basic email configuration. Once we are finished with that, we are going to install the required MailKit library and create...

Implementing HATEOAS in ASP.NET Core Web API

Implementing HATEOAS in ASP.NET Core Web API

In this article, we are going to talk about one of the most important concepts in building RESTful APIs - HATEOAS and learn how to implement HATEOAS in ASP.NET Core Web API. This article relies heavily on the concepts we've implemented so far in paging, filtering,...

Code Maze Weekly #7

Code Maze Weekly #7

As expected of the holiday season, we've seen fewer articles, but there are some really interesting pieces nonetheless. Check them out: .NET and C# A technique for building high-performance databases with EF Core [thereformedprogrammer.net] An exceptional article by...

Data Shaping in ASP.NET Core Web API

Data Shaping in ASP.NET Core Web API

In this article, we are going to talk about a neat concept called data shaping and how to implement it in ASP.NET Core Web API. To achieve that, we are going to use similar tools as we did in the sorting article. Data shaping is not something that every API needs, but...

Code Maze Weekly #6

Code Maze Weekly #6

We've compiled a lot of great articles this week so you can stock up before Christmas: .NET and C# An Introduction to Blazor and Web Assembly [grapecity.com] Is Blazor and Web Assembly hype justified or not? If you haven't learned what they are yet, here's your...

How to Implement Sorting in ASP.NET Core Web API

How to Implement Sorting in ASP.NET Core Web API

In this article, we're going to talk about sorting in ASP.NET Core Web API. Sorting is a commonly used mechanism, that every API should implement. Implementing it in ASP.NET Core is not difficult due to the flexibility of LINQ and good integration with EF Core. Learn what's missing from your Visual Studio template for .NET Framework projects. An Introduction...

Searching in ASP.NET Core Web API

Searching in ASP.NET Core Web API

In this article, we're going to tackle the topic of searching in ASP.NET Core Web API. Searching is one of those functionalities that can make or break your API, and the level of difficulty when implementing it can vary greatly depending on your specifications. If you...

Code Maze Weekly #4

Code Maze Weekly #4

We've read some great articles this week. Take a look: .NET and C# Cybertruck in XAML and running Cross-Platform with WebAssembly [platform.uno] Cybertruck in XAML? Smash its windows yourself! Converting integration tests to .NET Core 3.0: Upgrading to ASP.NET Core...

Filtering in ASP.NET Core Web API

Filtering in ASP.NET Core Web API

In this article, we will cover filtering in ASP.NET Core Web API. We'll learn what filtering is, how it's different from searching, and how to implement it in a real-world project. While not as critical as paging, filtering is still an important part of a flexible...

Code Maze Weekly #3

Code Maze Weekly #3

Here are the  articles that caught our attention this week: .NET and C# Embracing nullable reference types [devblogs.microsoft.com] "Make a plan! How are you going to act on nullable reference types? Try it out! Turn it on in your code and see what happens. Scary many...

Protecting Data with IDataProtector in ASP.NET Core

Protecting Data with IDataProtector in ASP.NET Core

In this article, we are going to learn about the ASP.NET Core built-in data protection mechanism, IDataProtector, which we can use to encrypt and decrypt our sensitive data. Encryption and decryption are not the only features we are going to cover. We will also show...

Code Maze Weekly #2

Code Maze Weekly #2

This week we've read dozens of quality articles and here's a weekly roundup. .NET and C# Avoiding Startup service injection in ASP.NET Core 3 [andrewlock.net] The third part of the series of articles about upgrading to ASP.NET Core 3.0 by Andrew Lock. HttpClient...

Paging in ASP.NET Core Web API

Paging in ASP.NET Core Web API

In this article, we're going to learn how to implement paging in ASP.NET Core Web API. Paging (pagination) is one of the most important concepts in building RESTful APIs. We don't want to return a collection of all resources when querying our API. That can cause...

Code Maze Weekly #1

Code Maze Weekly #1

Here are some of the best articles regarding .NET, C#, DevOps, and a bit of humor for this week. .NET and C# Converting a .NET Standard 2.0 library to .NET Core 3.0 [andrewlock.net] The first part of the series of articles about upgrading to ASP.NET Core 3.0 by Andrew...

System Testing a REST API using C# and DalSoft Rest Client

System Testing a REST API using C# and DalSoft Rest Client

In this post, we're going to cover the recent extensions to the DalSoft RestClient library which allows you to easily test a REST API using C#. This post is aimed at anyone (devs, testers, etc) who tests REST APIs and is suitable for all levels. If you haven’t written...

Getting Started with AutoMapper in ASP.NET Core

Getting Started with AutoMapper in ASP.NET Core

In this article, we are going to learn how to use AutoMapper in an ASP.NET Core application. We are going to start by looking into what AutoMapper is and what problem it solves. Then, we are going to explain how we can use AutoMapper in our MVC application. After...

Differences Between .NET Framework, .NET Core, and .NET Standard

Differences Between .NET Framework, .NET Core, and .NET Standard

Since the birth of various .NET implementations and .NET Standard, there has been a lot of confusion regarding these topics in the development community. We will try to eliminate that confusion by explaining these topics in a simple and understandable way. Let's start...

Automated UI Tests with Selenium and ASP.NET Core

Automated UI Tests with Selenium and ASP.NET Core

Selenium is a library that helps us automate browser behavior. We can use it for different purposes, but its primary use is for automated UI testing of web applications. In this article, we are going to use Selenium to write automated UI tests and with that finish our...

How to Include AntiForgeryToken for MVC Integration Testing

How to Include AntiForgeryToken for MVC Integration Testing

In the previous article, we have learned how to write integration tests for different actions (Index and Create), but while we were testing the Create (POST) action, we faced a problem with AntiForgeryToken validation. We skipped that problem by commenting out that...