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
|