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 moreC# | Where Value types and Reference Types are Stored?
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 moreConditional Operator Causing Unoptimized Linq Queries