Click here to Skip to main content
15,888,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ASM
Hi. I'm new to MVC and have run into a few problems using SQL Server 2008 R2 and VS2010:
1. I create a new MVC 3 Web Application.
2. I add a model, ADO.NET Entity Data Model.
3. I connect to the database, generate model from database, select the table I want.
4. The edmx file is created, everything appears to be ok.
5. I then try to add a controller with read write actions etc. I select the model I have just created from the drop down.
6. But when I click add I get a short delay and then a "unsupported context type" error.
Any ideas where I'm going wrong here? Is the issue with SQL Server 2008? The tutorials and articles I have seen all seem to use the Express edition but I need to be able to run the full edition.
Thanks in advance. And apologies if the answer is already there somewhere, haven't been able to find it.
Posted
Comments
zyck 25-Feb-12 19:08pm    
in number 6 what are you trying to add?
planB 26-Feb-12 4:03am    
Hi zyck, thanks for your reply. I'm starting with a very simple product table in a database called planb. After (4) I end up with planb.edmx and planB.Designer.cs. The classes within planB.Designer.cs are defined within the mvctest.Models namespace (my solution in called mvctest). When I try to create the controller (6) I select Model class 'product (mvctest.Models)' and Data context class 'product (mvctest.Models). Then I get the error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900