Tag: Entity Framework

Visual Studio Console App (.NET Framework) using Entity Framework and LocalDB

I often use Visual Studio and LocalDB in combination with Entity Framework 6+ for Prototyping or to make a quick sample. I also publish them sometimes to my Github Page Sample Code for this post can be found here: https://github.com/itsChris/Sample-EF-RelationsApp In the following steps we’ll: Create a .NET Framework 4.5 Console App -> not .NET…




How to view the SQL Generated by Entity Framework

How to view the SQL Generated by Entity Framework Entity Framework follows the following three steps. Translate C# code into SQL statementsExecute SQL on a target databaseReturn values back to C# objects. Now the question is how the generated SQL statements look like and how we can view the SQL executed on the database. StackOverflow…