Im new with VB.NET language and i need to log all queries generated in diferent controllers (SELECTs, UPDATEs, INSERTs and DELETEs). I have tried to search about this topic but all i found it is about EF6+ or C# which i have problems to migrate to VB.NET.
Im using a DbContext with references to all models defined in database and want to log any query generated by LINQ. Can someone help me?
Topics i have looked How do I view the SQL generated by the Entity Framework? How can I debug the SQL generated by EF5 during runtime? Entity Framework 4.1 - EFTracingProvider Log Queries executed by Entity Framework DbContext
I imagine that i need to define a logger attached to database in the DbContext (i saw it in EF6+ it is easy) but when i search about this in EF5, i dont find util documentation.
PD: The project use EF 5.0.0 and .NETFramework v4.5