<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/sources/codemaze/best-of/2024/02" -->

---
title: Best Code Maze posts — February 2024 | daily.dev
description: The most upvoted Code Maze posts from February 2024, curated by the daily.dev community.
canonical: https://daily.dev/sources/codemaze/best-of/2024/02
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:url: https://daily.dev/sources/codemaze/best-of/2024/02
og:type: website
og:site_name: daily.dev
og:title: Best Code Maze posts — February 2024 | daily.dev
og:description: The most upvoted Code Maze posts from February 2024, curated by the daily.dev community.
og:image: https://media.daily.dev/image/upload/s--VAY5ToZt--/f_auto/v1724209435/public/daily.dev%20-%20open%20graph
---

# Best of Code Maze — February 2024

1. 1  
[](https://daily.dev/posts/clean-architecture-in-net-iue7xafel "Clean Architecture in .NET")  
Article  
![Avatar of codemaze](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5004eb44be854b11bc10517031b0ad88)Code Maze · 3y  
Clean Architecture in .NET  
Clean Architecture is an architecture pattern aimed at building maintainable, scalable, and easily testable applications. It separates the application into different layers: domain, application, infrastructure, and presentation. Clean Architecture and Onion Architecture have similar goals but differ in how they separate layers based on abstraction and focus on the core. To implement Clean Architecture in .NET, follow the principles of separation of concerns, loose coupling, and testability. Use CQRS with MediatR for the application layer.  
47
2. 2  
[](https://daily.dev/posts/the-difference-between-restful-apis-and-web-apis-qbyqbxczx "The Difference Between RESTful APIs and Web APIs")  
Article  
![Avatar of codemaze](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5004eb44be854b11bc10517031b0ad88)Code Maze · 3y  
The Difference Between RESTful APIs and Web APIs  
This post explains the difference between RESTful APIs and Web APIs, the principles of REST architecture, and how to create a RESTful Web API with ASP.NET Core.  
17
3. 3  
[](https://daily.dev/posts/how-to-call-signalr-hub-from-controller-in-asp-net-core-d6idnyokh "How to Call SignalR Hub from Controller in ASP.NET Core")  
Article  
![Avatar of codemaze](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5004eb44be854b11bc10517031b0ad88)Code Maze · 3y  
How to Call SignalR Hub from Controller in ASP.NET Core  
This post explains how to call a SignalR Hub from a Controller in ASP.NET Core and demonstrates how to simulate a recurring server-client interaction using SignalR Hub and ASP.NET Core Controller.  
16
4. 4  
[](https://daily.dev/posts/creating-conditional-required-attributes-for-validation-in-net-web-api-20d9umtp9 "Creating Conditional Required Attributes for Validation in .NET Web API")  
Article  
![Avatar of codemaze](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5004eb44be854b11bc10517031b0ad88)Code Maze · 3y  
Creating Conditional Required Attributes for Validation in .NET Web API  
Learn about creating conditional required attributes for validation in .NET Web API and the approaches to achieve it. Explore the usage of custom validation attributes and the ExpressiveAnnotations library.  
13
5. 5  
[](https://daily.dev/posts/how-to-log-a-class-and-method-names-using-serilog-skpwokle2 "How to Log a Class and Method Names Using Serilog")  
Article  
![Avatar of codemaze](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5004eb44be854b11bc10517031b0ad88)Code Maze · 3y  
How to Log a Class and Method Names Using Serilog  
Learn how to log class and method names using Serilog in a Minimal API project.  
12
6. 6  
[](https://daily.dev/posts/tools-and-best-practices-for-secret-management-in-net-n84feoo4r "Tools and Best Practices for Secret Management in .NET")  
Article  
![Avatar of codemaze](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5004eb44be854b11bc10517031b0ad88)Code Maze · 3y  
Tools and Best Practices for Secret Management in .NET  
Learn about the tools and best practices for secret management in .NET applications, including the importance of secret management in software development.  
11
7. 7  
[](https://daily.dev/posts/different-ways-to-run-background-tasks-in-asp-net-core-wm4kmflem "Different Ways to Run Background Tasks in ASP.NET Core")  
Article  
![Avatar of codemaze](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5004eb44be854b11bc10517031b0ad88)Code Maze · 3y  
Different Ways to Run Background Tasks in ASP.NET Core  
This post explores different ways of running background tasks in ASP.NET Core applications without depending on external providers. It covers running one-off background tasks with IHostedService and BackgroundService, as well as running recurring background tasks with IHostedService and BackgroundService.  
11
8. 8  
[](https://daily.dev/posts/fastest-method-to-check-if-a-date-is-less-than-or-equal-to-today-1xoh6qrny "Fastest Method to Check if a Date is Less Than or Equal to Today")  
Article  
![Avatar of codemaze](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5004eb44be854b11bc10517031b0ad88)Code Maze · 3y  
Fastest Method to Check if a Date is Less Than or Equal to Today  
Learn different methods to check if a date is less than or equal to today in C#. Benchmark tests show that using the less than or equal to comparison operator (<=) is the fastest method.  
10
9. 9  
[](https://daily.dev/posts/parallel-foreachasync-and-task-run-with-when-all-in-c--hgtesvvnw "Parallel.ForEachAsync() and Task.Run() With When.All in C#")  
Article  
![Avatar of codemaze](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5004eb44be854b11bc10517031b0ad88)Code Maze · 3y  
Parallel.ForEachAsync() and Task.Run() With When.All in C#  
This post compares the 'Task.WhenAll()' and 'Parallel.ForEachAsync()' methods for parallel programming in C#. It discusses their benefits, usage, and considerations for different scenarios.  
10

[See all Code Maze archives](/sources/codemaze/best-of)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@graph":[{"@type":"CollectionPage","@id":"https://daily.dev/sources/codemaze/best-of/2024/02#page","url":"https://daily.dev/sources/codemaze/best-of/2024/02","name":"Best Code Maze Posts — February 2024","description":"The most upvoted Code Maze posts from February 2024, curated by the daily.dev community.","isPartOf":{"@type":"WebSite","url":"https://daily.dev"}},{"@type":"ItemList","@id":"https://daily.dev/sources/codemaze/best-of/2024/02#items","numberOfItems":9,"itemListElement":[{"@type":"ListItem","position":1,"url":"https://daily.dev/posts/clean-architecture-in-net-iue7xafel","name":"Clean Architecture in .NET"},{"@type":"ListItem","position":2,"url":"https://daily.dev/posts/the-difference-between-restful-apis-and-web-apis-qbyqbxczx","name":"The Difference Between RESTful APIs and Web APIs"},{"@type":"ListItem","position":3,"url":"https://daily.dev/posts/how-to-call-signalr-hub-from-controller-in-asp-net-core-d6idnyokh","name":"How to Call SignalR Hub from Controller in ASP.NET Core"},{"@type":"ListItem","position":4,"url":"https://daily.dev/posts/creating-conditional-required-attributes-for-validation-in-net-web-api-20d9umtp9","name":"Creating Conditional Required Attributes for Validation in .NET Web API"},{"@type":"ListItem","position":5,"url":"https://daily.dev/posts/how-to-log-a-class-and-method-names-using-serilog-skpwokle2","name":"How to Log a Class and Method Names Using Serilog"},{"@type":"ListItem","position":6,"url":"https://daily.dev/posts/tools-and-best-practices-for-secret-management-in-net-n84feoo4r","name":"Tools and Best Practices for Secret Management in .NET"},{"@type":"ListItem","position":7,"url":"https://daily.dev/posts/different-ways-to-run-background-tasks-in-asp-net-core-wm4kmflem","name":"Different Ways to Run Background Tasks in ASP.NET Core"},{"@type":"ListItem","position":8,"url":"https://daily.dev/posts/fastest-method-to-check-if-a-date-is-less-than-or-equal-to-today-1xoh6qrny","name":"Fastest Method to Check if a Date is Less Than or Equal to Today"},{"@type":"ListItem","position":9,"url":"https://daily.dev/posts/parallel-foreachasync-and-task-run-with-when-all-in-c--hgtesvvnw","name":"Parallel.ForEachAsync() and Task.Run() With When.All in C#"}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sources","item":"https://daily.dev/sources"},{"@type":"ListItem","position":3,"name":"Code Maze","item":"https://daily.dev/sources/codemaze"},{"@type":"ListItem","position":4,"name":"Best of","item":"https://daily.dev/sources/codemaze/best-of"},{"@type":"ListItem","position":5,"name":"February 2024"}]}]}
```

