 |
BOOK: Professional ASP.NET MVC 5
 | This is the forum to discuss the Wrox book Professional ASP.NET MVC 5 by Jon Galloway, Brad Wilson, K. Scott Allen, David Matson; ISBN: 978-1-118-79475-3 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional ASP.NET MVC 5 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
|
|
|
|
|

January 13th, 2015, 05:19 PM
|
|
Registered User
|
|
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
VS Express 2013 for web - Entity Data Model Diagram
Hi All,
Bloody hard work this book for a total beginner. Still I'm battling on, even though there's lots of language I don't understand.
Anyway, page 93 shows the Entity Data Model Diagram but doesn't explain how to get to this. Where is it please, or how do I see this please?
Thanks
Music.
|
|

January 15th, 2015, 12:13 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
ER Diagram
Hi Music,
I just learning MVC myself so take this with a grain of salt.
Back up your project so you can restore it if the following screws up the project.
If you want to see the ER Diagram, right click on the Models folder->Add->ADO.NET Entity Data Model
Use the default name - Model1 and click ok.
Select ER Designer from Data Base
In the next dialog, you should be able to make a connection to the MusicStoreDB
From there select all the tables and Finish
After a bit, you should see the tables like on page 93 - you can drag them around to suit your fancy. Close and "Save" the tab.
Be sure to save all and rebuild the project.
Doing this exercise shouldn't really change anything other than give you a nice diagram of the DB. You can see this diagram anytime by double clicking on Model1.edmx
The only tricky part of this is making sure you get the right "connection"
|
|

January 15th, 2015, 03:22 PM
|
|
Registered User
|
|
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi
Hi Dave,
Really appreciate the help. Unfortunately I don't have this option when right clicking Models. Im wondering if it because I am using the express 2013 version?
Ive tried installing Entity Framework 6 Tools for Visual Studio 2012 & 2013 just in case as I saw in another forum but it still doesnt appear.
Anyway, I suppose I don't need to see it but I know it will help in the future when I have more tables to see something visual.
Cheers
Music
|
|

January 15th, 2015, 03:49 PM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Models Folder
Hi Music,
I also use the Web Express version of VS2013. So, just to be clear, you right click the Models folder - and not a .cs model within the folder. You really should see an "Add" option and when you click that, you should see a list of options and 2/3s of the way down that list, you should see the ADO.NET Entity Data Model.
If you don't get this far, then I think something is screwed up with your VS settings. If you do get this far, let us know what happens next.
OOH, it's not really necessary to see this diagram as of page 93, but, OTOH, I think it's useful to get a handle on this procedure. The only reason I know about this is because I'm a stubborn old (very old!) DB guy and I like to manage my DB in SQL Server Express and use the Management Tool to see what's going on and make any changes.
|
|

January 26th, 2015, 04:53 PM
|
|
Registered User
|
|
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Definitely not there.
Hi Dave,
Sorry for the late response, working away from home unfortunately.
Yes, I'm clicking on the right bit as you can see here : http://strensa.com/wp-content/upload...models_wro.jpg
but it doesn't exist.
I know it's not essential, but I know this would prove handy in the future as the tables grow.
Cheers
Music
|
|

January 26th, 2015, 05:21 PM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Missing Option
Hi Music,
First, I very much agree that it's useful to have this ability.
I looked at your screen capture and have no idea why the option doesn't show - hopefully one of the authors will comment on this. Here is my screen capture and this is how it should look.
Did you build up the project from scratch or is this a downloaded project? If it's a download, it's hard to tell what you have. If you started from scratch - as I did - then there must be some kind of configuration problem - I would guess.
I would bring up a fresh project (make no changes) and immediately right click Models. I did this and saw the option - you should also.
|
|

January 28th, 2015, 04:08 PM
|
|
Wrox Author
|
|
Join Date: Oct 2006
Posts: 36
Thanks: 1
Thanked 5 Times in 5 Posts
|
|
I saw this thread on StackOverflow from someone who was missing the ADO.NET Entity Data Model option and solved it: http://stackoverflow.com/questions/2...al-studio-2013
|
|

February 3rd, 2015, 02:30 PM
|
|
Registered User
|
|
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Tried it already
Hi Jon,
Thanks for the reply.
Yeah, I had seen this thread already and tried installing "Entity Framework 6 Tools for Visual Studio 2012 & 2013" but the problem persists. Also the there is no "EFTools.msi" in "C:\ProgramData\Package Cache" for me.
Cheers
James.
P.S - The reason I bought this book by the way, was because of the video you made for http://www.microsoftvirtualacademy.com. :)
|
|

March 15th, 2015, 09:13 PM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Once More
Hi Music,
Not sure if you're still interested but I started another little project and found the same problem you did - no ADO.NET Entity Data Model option. Not sure why?
Anyway, I clicked "add new item" and then under C# Data the ADO.NET Entity Data Model option was available.
Once I did it this way, the option then appeared as we discussed previously. Little late!
|
|

March 16th, 2015, 05:22 AM
|
|
Registered User
|
|
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Brilliant
Hi Dave,
Not late at all. Ill try this when I get home tonight.
Thanks so much.
Music
|
|
 |
|