LINQ Joins on multiple columns in Entity Framework
A developer explains a compiler error when performing LINQ joins on multiple columns in Entity Framework and provides the solution requiring matching anonymous type property names.
Steven Giesel is a Senior Software Engineer and Microsoft MVP with over 13 years of experience, specializing in .NET and modern backend development. He shares deep technical knowledge across topics such as C#, EF Core, RavenDB, distributed systems, and cloud-native architectures, and is an active speaker in the .NET community.
323 articles from this blog
A developer explains a compiler error when performing LINQ joins on multiple columns in Entity Framework and provides the solution requiring matching anonymous type property names.
A guide on mocking HttpClient calls in .NET API tests using DelegatingHandler and WebApplicationFactory for stable, controlled testing.
Discusses the pros and cons of soft deleting database records, including implementation, performance, and alternatives.
Explains how to use FormattableStringFactory in C# to create dynamic SQL queries safely with Entity Framework Core, preventing SQL injection.
The .NET team concludes its async2 experiment, exploring a new runtime-based implementation of async/await for improved efficiency and flexibility.
Explains how to use the AsParametersAttribute in ASP.NET Minimal APIs to organize endpoint parameters into cleaner, encapsulated DTOs.
Explores the massive and growing number of public APIs in the .NET ecosystem, analyzing counts across different versions of ASP.NET Core.
Explains how the C# compiler transforms async/await code into a state machine, detailing the process with a simplified example.
Analyzes a flawed LinkedIn benchmark on LINQ's 'let' keyword, explaining why the test doesn't measure real performance and how to benchmark correctly.
Explains the new UUID v7 (GUID) generation in .NET 9, highlighting its sortable timestamp structure and usage.
A guide on using GitHub Codespaces to simplify contributor onboarding for .NET open-source projects by setting up pre-configured cloud dev environments.
Introducing the new ReadOnlySet<T> type in .NET 9, explaining its purpose and advantages over existing interfaces and workarounds.
Announcing new features in NCronJob, a .NET job scheduler, including dependent jobs and Minimal API support.
Explains how Entity Framework protects against SQL injection in LINQ queries but warns of risks when using raw SQL, highlighting safer alternatives.
Explains how HttpClient's await behavior works with response headers vs. body, and how to control it using HttpCompletionOption.
Explores StringBuilder performance and memory usage for creating very large strings in C#, comparing it to using a List.
Explains how to cancel a C# task using multiple CancellationToken sources by linking them with CancellationTokenSource.CreateLinkedTokenSource.
Explains why certain exception instances like OutOfMemoryException are pre-allocated in .NET memory dumps, even in simple applications.
Explains the differences between .NET's MemoryCache, DistributedCache, and the new HybridCache, including their use cases and code examples.
A guide on using the httpgenerator tool to automatically create HTTP request files from a Swagger/OpenAPI definition for easier API testing.