Best of .NETDecember 2024

  1. 1
    Video
    Avatar of christitustechChris Titus Tech·1y

    150 Days of Programming

    After five months of diving into software development, the author shares their experiences and accomplishments across various projects. They utilized multiple programming languages, including Python, Rust, PowerShell, and C#. The post covers the techniques, tools, and methodologies used, along with the challenges and successes faced. The author highlights the importance of selecting the right language for each project and evaluating their performance and syntax, ultimately expressing a preference for C# and .NET for Windows applications.

  2. 2
    Article
    Avatar of collectionsCollections·1y

    Master Refresh Tokens in ASP.NET Core (Building from Scratch)

    Learn how to implement refresh tokens in an ASP.NET Core application, enhancing security and user experience. This guide covers key concepts such as access tokens, refresh tokens, and token lifetimes. It provides step-by-step instructions on setting up a database, generating tokens, creating a token refresh endpoint, and managing token lifetimes while emphasizing best practices like secure storage and regular token rotation.

  3. 3
    Article
    Avatar of milanjovanovicMilan Jovanović·1y

    What Rewriting a 40-Year-Old Project Taught Me About Software Development

    Rewriting a legacy system built over four decades with APL into a modern stack using .NET, PostgreSQL, and React posed significant technical and organizational challenges. The process involved understanding the deeply complex and integrated legacy system, managing product vs. engineering priorities, and ensuring zero downtime during the migration. Key strategies included modular monolith architecture, cloud-ready design, and robust CI/CD pipelines. Success depended not only on technical solutions but also on effective stakeholder management and knowledge transfer.

  4. 4
    Article
    Avatar of elmahelmah.io·1y

    How to bulk insert with EF Core

    Discover multiple methods for bulk inserting data with Entity Framework Core, including using the Add method, AddRange, EFCore.BulkExtensions, and ExecuteSqlRaw. Learn about their advantages, disadvantages, and best practices for optimizing performance and resource usage when handling large datasets or migrating data.

  5. 5
    Article
    Avatar of bartwullemsThe Art of Simplicity·1y

    Practical debugging for .NET Developers

    Debugging remains a vital skill for software developers, even with AI advancements. 'Practical Debugging for .NET Developers' by Michael Shpilt is a free book that helps developers improve their debugging skills through the use of the right tools and methodologies. The book aims to make developers more efficient and productive by teaching systematic debugging techniques.

  6. 6
    Video
    Avatar of nickchapsasNick Chapsas·1y

    Make Your API Requests INSANELY Fast in .NET

    Nick demonstrates how to use the Replicant package to significantly improve the performance of API requests by caching responses. The method ensures that repeated API calls are nearly instantaneous by leveraging HTTP headers and caching mechanisms. This approach works with any API and greatly reduces the response time by avoiding duplicate data fetching.

  7. 7
    Article
    Avatar of bartwullemsThe Art of Simplicity·1y

    Efficient searching in .NET with SearchValues

    The post explores the SearchValues functionality introduced in .NET 8 and enhanced in .NET 9. SearchValues<T> optimizes searches by specifying values to search for and is beneficial when the same search values are frequently used. It now supports string values in addition to simple data types like char.

  8. 8
    Article
    Avatar of aspnetASP.NET Blog·1y

    Top .NET Blogs Posts of 2024

    In 2024, the .NET blog continued to be a significant resource for developers, highlighting the release of .NET 9 with comprehensive documentation and performance improvements. Key topics included ASP.NET Core metrics, .NET Aspire for cloud-native development, and the introduction of AI-powered UI controls with .NET Smart Components. The blog also featured detailed posts on C# 12 and AI advancements in .NET, providing insights and updates to the .NET community.

  9. 9
    Article
    Avatar of milanjovanovicMilan Jovanović·1y

    Scheduling Background Jobs With Quartz in .NET (advanced concepts)

    Learn how to set up Quartz.NET with ASP.NET Core for robust background job scheduling. This guide covers installing necessary NuGet packages, setting up Quartz services and OpenTelemetry instrumentation, defining and scheduling jobs using JobDataMap, handling both one-time and recurring jobs, and configuring persistent storage with PostgreSQL. Additionally, it highlights best practices such as using durable jobs for consistent job definitions.

  10. 10
    Video
    Avatar of wearedotnetWe Are .NET·1y

    The Right Way To Build Async APIs in ASP.NET Core

    Learn how to build asynchronous REST APIs in ASP.NET Core where requests get an immediate response, while the detailed work happens in the background. The post provides an example of a thumbnail generation service, which processes image resizing asynchronously using the Channel class and background services. It discusses how to improve user experience by decoupling slow processing from the main request-response cycle and offers insights into managing asynchronous tasks effectively.

  11. 11
    Article
    Avatar of milanjovanovicMilan Jovanović·1y

    Central Package Management in .NET - Simplify NuGet Dependencies

    Central Package Management (CPM) in .NET simplifies managing NuGet package versions across multiple projects by allowing developers to set package versions centrally in a single file. This resolves version conflicts, reduces bugs, and streamlines development. Setting up CPM requires NuGet 6.2, .NET SDK 6.0.300, and Visual Studio 2022 17.2 or newer. Instructions are provided for setting up CPM, overriding package versions, and making packages global across projects.

  12. 12
    Article
    Avatar of atomicobjectAtomic Spin·1y

    LINQ Expressions: LINQuistics of C#

    LINQ expressions in C# enhance coding efficiency by simplifying complex SQL queries and allowing powerful data manipulation. They offer a concise and readable way to retrieve and sort data, applicable both within SQL contexts and with general collections in C#. Examples include accessing specific messages from databases, sorting unique IDs from templates, and creating mock data for testing. LINQ helps in making code more efficient and easier to manage.

  13. 13
    Article
    Avatar of elmahelmah.io·1y

    How to Monitor Your App’s Performance with .NET Benchmarking

    Benchmarking is crucial for optimizing application performance, and BenchmarkDotNet is a widely used tool for .NET applications. It allows developers to measure key performance metrics systematically, ensuring accurate and detailed insights. Through simple syntax and various annotations, BenchmarkDotNet can analyze execution time, resource utilization, and memory allocations, offering the results in a comprehensive, tabular format. The library runs benchmarks in isolation, eliminating system noise and outliers, and supports categorizing benchmarks logically for large applications. Its integration is straightforward, supporting multiple platforms including macOS, Linux, and Windows.

  14. 14
    Article
    Avatar of aspnetASP.NET Blog·1y

    Using Local AI models with .NET Aspire

    Learn how to use local AI models with .NET Aspire, integrating Ollama for running models locally and easily transitioning to cloud-hosted models. The guide covers setting up Ollama, adding and configuring models, and using Microsoft.Extensions.AI abstractions to facilitate switching between local and cloud AI services. Discover how to set up an Ollama server, download and manage models, and integrate them into your client application, as well as handling deployments using cloud-based AI services like Azure OpenAI.

  15. 15
    Article
    Avatar of csharpcornerC# Corner·1y

    Understanding .http Files in .NET 8

    Microsoft has introduced .http files in .NET 8, allowing developers to create and send HTTP requests directly within Visual Studio. These files simplify API testing, enhance development accuracy, and improve workflow integration. The post provides a step-by-step guide on creating and using .http files in an ASP.NET Core Web API project, showcasing their advantages over traditional third-party tools.

  16. 16
    Article
    Avatar of devsquadDev Squad·1y

    🤔 Are you unintentionally slowing down your .NET APIs?

    Discover how implementing the Result Pattern for error handling in .NET APIs can lead to significant performance improvements. Learn to build faster and more resilient Web APIs by replacing exceptions with results.

  17. 17
    Article
    Avatar of codemazeCode Maze·1y

    Global Query Filters in Entity Framework Core

    Global query filters in EF Core allow applying `WHERE` conditions to all queries on an entity type. Common use cases include row-level security, multitenancy, and implementing soft delete. This post explains how to set up EF Core, define a `DbContext`, set up entities, and apply global query filters. It also shows how to disable these filters for specific queries and highlights considerations with navigation properties to avoid pitfalls.

  18. 18
    Article
    Avatar of milanjovanovicMilan Jovanović·1y

    Internal vs. Public APIs in Modular Monoliths

    Public APIs in modular monoliths are crucial for controlling dependencies and maintaining clear boundaries between modules. They serve as contract definitions, dependency control points, and facilitate change management. Proper design dictating what to expose, along with maintaining separate schemas and connection strings, is essential for maintainability and avoiding system chaos.

  19. 19
    Video
    Avatar of nickchapsasNick Chapsas·1y

    Writing Safe String Interpolated SQL in .NET

    Learn how to safely use string interpolation in SQL queries within .NET applications without risking SQL injection. The methods covered are applicable across raw ADO.NET, Dapper, and EF Core. Discover how to simplify SQL queries with the Interpolated SQL package and make your code more secure and efficient.

  20. 20
    Article
    Avatar of wearedotnetWe Are .NET·1y

    A Dozen Programmer Utilities

    Discover a curated list of indispensable programmer utilities, including Visual Studio 2022, Copilot, ExamDiffPro, Tweaks by Mads Kristensen, Viasfora, Evernote, LastPass, Git Diff Margin, DB Browser for SQLite, and BlueSky. These tools enhance productivity and streamline various aspects of software development. Most of them are free, offering significant value without a hefty price tag.

  21. 21
    Article
    Avatar of aarononthewebAaronontheweb·1y

    Frameworkism: Senior Software Developers' Pit of Doom

    The post discusses the issue of 'frameworkism', where developers build rigid, preemptive frameworks that lead to significant technical debt. It details the problems encountered in the Sdkbin project, where copying and pasting code from previous projects without adaptation resulted in a cumbersome system that's hard to maintain. The author stresses the importance of understanding and modeling business needs accurately in the code rather than prematurely optimizing or enforcing standardized frameworks.

  22. 22
    Article
    Avatar of softwaretestingmagazineSoftware Testing Magazine·1y

    Open Source .NET Behavior-Driven Development (BDD) Tools

    Behavior-Driven Development (BDD) is an Agile approach integrating requirement gathering, documentation, and acceptance testing by writing human-readable sentences describing application features. Several open source .NET BDD tools like SpecFlow, BDDfy, Concordion.NET, and others help store requirements as live documentation and perform functional or acceptance tests, ensuring correct implementation of features.

  23. 23
    Video
    Avatar of nickchapsasNick Chapsas·1y

    The Best Way to Run Database Migrations

    Learn how to properly manage database migrations in .NET applications to avoid common pitfalls and ensure smooth production deployments. Discover why running migrations at application startup is problematic and how to shift this process to the release pipeline. The post covers practical steps and tools, such as using Entity Framework's CLI and configuring GitHub Actions, to automate and secure the migration process.

  24. 24
    Video
    Avatar of wearedotnetWe Are .NET·1y

    The Simplest Background Processing in .NET - Channels

    In .NET, channels provide a simple API for implementing background processing. They allow you to write and read messages from a pipeline. The ChannelReader property offers a ReadAllAsync method that returns an async enumerable, which can be iterated over using an await foreach to perform background tasks.

  25. 25
    Article
    Avatar of java_libhuntAwesome Java Newsletter·1y

    How Much Memory Do You Need in 2024 to Run 1 Million Concurrent Tasks?

    A benchmark comparison in 2024 reveals how different programming languages handle memory consumption for running 1 million concurrent tasks, particularly focusing on coroutines rather than multiple threads. The benchmark highlights significant improvements in .NET with NativeAOT, which is now highly competitive with Rust. Surprisingly, Go's goroutines consumed more memory than expected, while Java's native image built with GraalVM showed efficient memory usage.