How to create relationships between entities in the Entity Framework Code First Approach

The Entity Framework Code First approach allows us to create a model as a plain class and then the database gets created from the domain model or entity class. In the Code First approach, the database gets created from the classes. Some advantages of the Entity Framework Code First approach include (as stated in Scott … Continue reading How to create relationships between entities in the Entity Framework Code First Approach

Advertisements

How to view the generated SQL Query of LINQ

Have you ever thought of viewing generated SQL query of LINQ you write? You may need the generated query for the debugging and the logging purposes. In this post let us see how to print the generated SQL query on the console. Let us consider you have written LINQ as follows: You can print the … Continue reading How to view the generated SQL Query of LINQ