Solved

Type or namespace name could not be found for model

Posted on 2014-12-22
2
66 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 33

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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