How to use DebugView to Log Entity Framework

In this post I will show you to use DebugView to log the Entity Framework. For detail discussion on the same topic you may want to learn more here:

Logging in Entity Framework on Steve Smith Blog

Profiling Database Activity in the Entity Framework by Julie Lerman

Download DebugView , unzip it and Run it as administrator. In Capture menu select the options as shown in below image,

image

Once the debugview is configured, you should configure the DataContext class as shown below. Enable database log to print on the debug window.

image

As the last step run the application using Entity framework without using Visual Studio or without attaching Visual Studio Debugger. In Visual Studio run the application using Ctrl+ F5. You should able to view the Entityframework log in Debugview as follows:

image 

The Debugview can be your good friend when you stuck with performance issues and want to log the queries.

Happy Coding.

Work with ASP.NET MVC 5 Areas from different projects

Read full article on Falafel blog

While working on an ASP.NET MVC 5 application, I came across a requirement to use an Area from one project in another project. For example: I have a project A and a project B. I need to use an Area which is part of project B inside of project A. In this post I will discuss how this can be achieved.

To start with, let us say I have an MVC project AreaDemo with the structure as follows:

clip_image002

Read full article on Falafel blog