Smarter APIs with GraphQL
While REST is not going away anytime soon and remains perfectly suited for many use cases, GraphQL offers significant advantages for applications where flexibility, efficiency, and rapid development cycles are critical. By enabling more precise data fetching, reducing the number of network requests, and improving the overall developer experience, GraphQL is helping to shape the future of API development.
Follow this step by step guide to setup your first GraphQL Client and Server in C# with .NET!
Handling Large Files: BufferedStream vs LINQ's Chunk method
The choice between using BufferedStream and the LINQ Chunk extension method for operating with very large files depends on your specific use case and requirements. Here we discuss the pros and cons for each.
Using the Model Context Protocol (MCP) with C#
With the new MCP C# SDK, developers can efficiently manage communication between AI models and applications.
Anthropic’s Model Context Protocol (MCP) is currently making waves. It's a standardized protocol designed to streamline communication between applications and models by offering a structured way to exchange context and data between AI models and their clients. Whether you're developing AI-powered applications or integrating multiple models into a cohesive system, MCP ensures interoperability and scalability.
API Documentation Changes in .NET 9
The removal of Swagger from .NET 9 and the introduction of built-in OpenAPI support mark a significant shift in the .NET ecosystem. While this change may require developers to adapt to new tools and workflows, it also presents an opportunity to streamline and improve the API development process. The built-in OpenAPI support in .NET 9 offers a more integrated and efficient solution for generating and managing API documentation, while alternative solutions such as NSwag, ReDoc, Stoplight and Scalar provide developers with a range of options to choose from.
.NET object-oriented fluent SQL Builder
KnightMoves.SqlObjects is a .NET NuGet package that provides an object-oriented fluent SQL builder, allowing developers to construct SQL queries using C# objects instead of string manipulation, closely mirroring T-SQL syntax for a more intuitive experience.
Random.Shared in .NET9
With .NET9 Microsoft introduced Random.Shared for for thread-safe random number generation.
.NET LINQ vs Java Stream API
In Java, the closest equivalent to .NET's LINQ (Language Integrated Query) is the Stream API introduced in Java 8. Both LINQ in .NET and the Stream API in Java provide a functional approach to handling collections, enabling operations like filtering, mapping, reducing, and sorting in a concise and readable manner. However, there are significant differences in how these two approaches leverage hardware acceleration, which can impact performance.
Simplifying Dependency Injection
Dependency Injection (DI) is a cornerstone of modern .NET applications, ensuring loose coupling, testability, and maintainability. However, traditional DI configurations can quickly become verbose and boilerplate-heavy. Developers often find themselves manually registering every service, leading to cluttered Program.cs
files and a tedious onboarding experience. Campsis.AutoInject comes to the rescue!
Critical: .NET Install links are changing
.NET binaries and installers have moved to a new domain -- builds.dotnet.microsoft.com
-- backed by a new Content Delivery Network (CDN). You may need to make changes to adjust.
Global and implicit Using statements in C# 10
Global and implicit Using statements in C# 10 reduce the number of usings you need to specify at the top of each file.