Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2013, 09:49 PM
Banned
 
Join Date: May 2013
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
 
Old July 9th, 2013, 02:47 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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!
 
Old July 10th, 2013, 06:13 PM
Banned
 
Join Date: May 2013
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.
 
Old July 11th, 2013, 02:29 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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!
The Following User Says Thank You to Imar For This Useful Post:
nudirection (July 11th, 2013)





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.