Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
Password Reminder
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 Search this Thread Display Modes
  #1 (permalink)  
Old July 8th, 2013, 09:49 PM
Banned
Points: 33, Level: 1
Points: 33, Level: 1 Points: 33, Level: 1 Points: 33, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Location: Atlanta, Georiga USA
Posts: 8
Thanks: 3
Thanked 0 Times in 0 Posts
Default Chapter 14 - Using Data Controls with the Entity Framework

Hello Imar,

In the Try It Out, A Simple EntityDataSource Application, item 4, my PhotoAlbum and Picture tables aren't showing up when I choose Update Model from Database. I just see the sysdiagrams.

Regards, Mark
Reply With Quote
  #2 (permalink)  
Old July 9th, 2013, 02:47 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Mark,

Maybe an obvious question, but did you add the tables to the correct database?
And are the tables visible in the Refresh / Update tab of the wizard (can't remember the exact tab name)? That would be the case if you added them earlier.

Otherwise, I am not sure what's going on; all tables that are not on the diagram yet should appear in the list of new tables.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old July 10th, 2013, 06:13 PM
Banned
Points: 33, Level: 1
Points: 33, Level: 1 Points: 33, Level: 1 Points: 33, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Location: Atlanta, Georiga USA
Posts: 8
Thanks: 3
Thanked 0 Times in 0 Posts
Default

That's probably what happened. I added the new tables to my PlanetWrox database, but I guess I pulled the tables from the PlanetWroxTemp into my PlanetWrox.edmx file in VB. I don't recall now. Guess I shouldn't have deleted my PlanetWroxTemp database so quickly. The strange thing is my PlanetWrox database points to my C:\BegASPNET\Site\App_Data folder and I don't recall setting it up that way. Is there a way to tell the database to move the files to my C:\Databases folder? It's empty now. Or do I just need to restart at Chapter 12 again?

Also, would you know why I have a DevelopmentStorageDb201210 database? I don't know where that came from either.

I am such a noob.
Reply With Quote
  #4 (permalink)  
Old July 11th, 2013, 02:29 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,
Quote:
Guess I shouldn't have deleted my PlanetWroxTemp database so quickly.
The Temp database was only used to demonstrate some concepts. You don't need it for the PlanetWrox site.

Quote:
The strange thing is my PlanetWrox database points to my C:\BegASPNET\Site\App_Data folder
That's where you added it when you created the MDF file initially (when you followed the exercises). During development, having the database in Ap_Data can be quite handy as you can copy the entire site from one location to another, without external dependencies like a database.

You can move the database to C:\Databases but then you have to update the attachdbfilename attribute in Web.config to point to C:\Databases or you can attached the database to SQL Server and then update your connection strings to point your local server and database name instead of its location (using Initial Catalog). Appendix B has more info.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
nudirection (July 11th, 2013)
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Chapter 14: Entity Model Code WILL NOT WORK! pittfurg BOOK: Beginning ASP.NET 4 : in C# and VB 6 February 28th, 2013 07:48 AM
Entity Framework vbboyd BOOK: Beginning ASP.NET 4.5 : in C# and VB 5 January 18th, 2013 11:48 AM
Chapter 14 Paging Data with the Listview and DataPager Controls rmanapul BOOK: Beginning ASP.NET 4 : in C# and VB 4 May 22nd, 2012 04:10 AM
Chapter 14 - ADO.NET Entity Data Model Sean1980 BOOK: Beginning ASP.NET 4 : in C# and VB 3 July 15th, 2011 12:24 PM
Chapter 14 Linq and ado.net entity framework pandukal21 BOOK: Beginning ASP.NET 4 : in C# and VB 8 January 28th, 2011 05:19 AM



All times are GMT -4. The time now is 02:35 PM.


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