Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 26th, 2013, 01:25 PM
Registered User
Points: 32, Level: 1
Points: 32, Level: 1 Points: 32, Level: 1 Points: 32, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2013
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default Entity Framework issue

Hi,
To practice on what I learn, I create another Database website using the ADO.NET Entity Framework. I do exactly the same as in Chapter 14 (create the edmx file and delete the 2 files with ".tt" extension) with the below code:
using (MyEntities myEnt = new MyEntities())
{
.....
}

When I click the word "MyEntities" and press Ctrl+., the select list don't have the option "using MyModel", only got the "Generate class for 'MyEntities'". When I manually type the "using MyModel;" at the top, it gave an error: "The type or namespace name 'MyModel' could not be found (are you missing a using directive or assembly reference?)".

Any idea what might be the cause and how to solve this.

Thanks and have a nice day.

Last edited by weixing; April 26th, 2013 at 01:28 PM. Reason: add more details
Reply With Quote
  #2 (permalink)  
Old April 26th, 2013, 01:37 PM
Registered User
Points: 32, Level: 1
Points: 32, Level: 1 Points: 32, Level: 1 Points: 32, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2013
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi,
I try again and now it's work. After some testing, I think I miss out the step to change the "Code Generation Strategy property from None to Default".

Have a nice day.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
using entity framework 5 misuk11 BOOK: Professional ASP.NET Design Patterns 1 February 25th, 2014 04:23 PM
Entity Framework vbboyd BOOK: Beginning ASP.NET 4.5 : in C# and VB 5 January 18th, 2013 10:48 AM
Entity Framework v1 issue Olin BOOK: Professional ASP.NET MVC 2 2 January 24th, 2011 03:49 PM
Switching To entity framework luckystar BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 0 July 31st, 2009 09:52 PM



All times are GMT -4. The time now is 06:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.