Solved

Type or namespace name could not be found for model

Posted on 2014-12-22
2
68 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 34

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 36

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 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