Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : 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 November 8th, 2014, 08:51 PM
Registered User
 
Join Date: Nov 2014
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Missing DB Diagram Option

Hi there,

While working through chapter 14 I was unable to complete the steps to add to the database diagram, the two new tables 'PhotoAlbum' and 'Picture' because the module listing in the Server Explorer was missing the Database Diagrams option. Why would that be?

To try and work around this, I opened SQL Server Management Studio and accessed the database file and added the diagram to match the instructions. I was then able to complete the steps to add the two new tables to the Entity Framework model file. However, when I try to run the NewPhotoAlbum.aspx page, I get a series of errors saying "The type or namespace name 'PhotoAlbum' could not be found (are you missing a using directive or an assembly reference?)'.

I suspect that this has something to do with how I had to establish the foreign key in the PhotoAlbum table.

I opened and ran the code from Chapter 14 and I runs fine but the code is slightly different than what I had produced. The class definition in the NewPhotoAlbum.aspx.cs file was: 'public partial class _NewPhotoAlbum : System.Web.UI.Page' while the same line in my version lacked the leading underscore in front of NewPhotoAlbum (the 'Inherits' property in the my NewPhtoAlbum.aspx file referred the same form of NewPhotoAlbum). Otherwise, the code looked identical between the files I compared.

Anyone know why I wouldn't have the Database Diagram option in my Server Explorer?

Thanks,
Pete
 
Old November 13th, 2014, 04:32 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Pete,

Not sure what happened there. Did you create the database outside of Visual Studio? I have seen this before in SSMS when I create a database with Entity Framework code first (that automatically creates the database). Then when I try to add a diagram, I get a dialog about missing objects to support diagrams. After confirming, the missing objects get created and I can create a diagram. Maybe the same thing happens in VS but it doesn't have the tools to create the missing objects? Just a guess....

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
File -> Export Template Option Missing Sandrier BOOK: Beginning ASP.NET 4 : in C# and VB 1 July 22nd, 2011 06:49 AM
OLE DB Destination with Fast Load option Luc_Magnee BOOK: Professional Microsoft SQL Server 2008 Integration Services ISBN: 978-0-470-24795-2 0 March 29th, 2010 07:42 AM
Compare Two MS access db file and find missing rec lawsoncobol Reporting Services 0 August 3rd, 2006 04:14 AM
Proplem with Db Diagram in Enterprise Manager? fizzer SQL Server 2000 1 March 20th, 2006 12:51 AM
Adding an option to change password to movie db IP076 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 November 30th, 2004 01:08 PM





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