Question: I'm creating a new MVC 3 application.  

Steps taken:  

1. Added new model by right clicking on Models and adding "LINQ to SQL Classes"  

2. Dragged tables from Server Explorer to my new dbml layout and saved  

3. Right click on Controllers->Add->Controller  

4. Enter the following information:  

> 
> **Controller name:** UserController  
> 
> **Template:** Controller with read/write actions and views, using Entity Framework  
> 
> **Model Class:** aspnet\_User (TierPay)  
> 
> **Data Context Class:** AgricultureDataContext (TierPay)  
> 
> **Views:** Razor (VBHTML)  
> 
> 
> 
> 

5.Click Add  

6.Get the following error:  

**Unsupported context type.**

I've Googled around and haven't found any answers.
Thanks!

Answer: 
This dialog is confusing at first when using the Entity Framework Database first option. 

If you are using DB first then both the "model class" dropdown and the "data context class" dropdown will appear to have the same class names.

If you are for instance, attempting to create a controller bound to a model of type "User" lets say you will see "User" both in the model drop down list as well as in the "Data Context" part of the dialog.

In the "model class" part of the dialog you want to select your model (User in our example here).

In the "Data Context class" part of the dialog you do not want to also select "User". Instead you want to select the class that is in your EDMX file that inherits from ObjectContext. There will be one class like this in the drop down list if you are using DB first. You will see this class in the list and I have no idea why the other classes are in the list. I think that may be a small UI defect from Microsoft.

If you do not know what this class is, simply go to your EDMX model and click the designer.cs file associated with it. At the top of this code you will see the class that inherits from ObjectContext. This is the class you want to select.
I am not sure if this is exactly what you were looking for.. but I noticed the same error myself..
Google was not much help and I wound up spotting the issue myself.

Possible Solution:

If you are creating a Model that contains an EF (Entity Framework) class that extends to another class.. make sure that you are extending that constructor to the intended EF class and not the Model Class file unintentionally..

I apologize for the poor explanation but I am new to this..
Let me know if this helps.

Regards