Log Entity Framework Core generated SQL in ASP.NET Core
If you’re a .NET developer, then you are most probably familiar with Entity Framework data access technology that Microsoft provides for developers. But still, if you are not familiar then let me explain to you. Entity Framework is an Object (Relational) Mapper for database objects, meaning it lets you query database records using LINQ (Language-integrated query) and under the hood, it generates the resulting query based on your LINQ expression and executes it on the database, and if there are resulting records from SQL query then those records EF maps to your C# class objects, so that you don’t have to do that heavy lifting for mapping database values to C# objects and vice versa....