title: Injecting DbContext in constructor of Web api 2 controller
body: <p>I am creating a small proof of concept asp.net web api 2 service with entity framework code first. The controller's constructor looks like</p>
  
  <pre><code>public AccountController: ApiController
  {
      private readonly DbContext context;
      public AccountController(DbContext _context){
          context = _context;
      }
      public AccountController(){context = new ApplicationContext();}
  }
  </code></pre>
  
  <p>I need to unit test my controllers. How can I mock the DbContext class. Is there a simple way of doing this? I want to avoid all that repository pattern with lot of interfaces. Because it will be a way overkill for this prototype.  </p>