Solved

Type or namespace name could not be found for model

Posted on 2014-12-22
2
57 Views
Last Modified: 2014-12-29
The type or namespace name could not be found for my model. Please see screenshot.

Thanks in advance for your help.

screenshot
0
Comment
Question by:princeservice
2 Comments
 
LVL 32

Accepted Solution

by:
it_saige earned 250 total points
ID: 40513181
Try using:
public ActionResult Index()
{
	var db = new routingsModel();
	var model = db.V_Routings.ToList();
	return View(model);
}

Open in new window


-saige-
0
 
LVL 35

Assisted Solution

by:Miguel Oz
Miguel Oz earned 250 total points
ID: 40514351
I think there may be a typo.
When you created the EF context class, you should not use the DOT(".") because .NET will interpret routingsModel as a namespace. furthermore, the dot is use as an operator to access class members.
If this is the case, then please rename the class "routingsModel.Context" to "routingsModelContext"
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now