C# | Where Value types and Reference Types are Stored?

Reference types are always stored on Heap. But value types are stored on based on where they are declared. Value types declared as class members will be allocated on Heap. Value types declared in function arguments, inside function are allocated on Heap. Value type in struct will depend on where the struct has been created. … Read more

Conditional Operator Causing Unoptimized Linq Queries

Today, I was debugging a .net core API. It was taking more than a minute to execute for a simple query which was fetching two-three related entities also. When I started going through the console for the generated SQL, I figured out that the query is split into three parts and each part was taking … Read more