Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5.1 > BOOK: Professional ASP.NET MVC 5
|
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
 
Old January 13th, 2015, 05:19 PM
Registered User
 
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
 
Old January 15th, 2015, 12:13 AM
Authorized User
 
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
Default 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"
 
Old January 15th, 2015, 03:22 PM
Registered User
 
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old January 15th, 2015, 03:49 PM
Authorized User
 
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
Default 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.
 
Old January 26th, 2015, 04:53 PM
Registered User
 
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old January 26th, 2015, 05:21 PM
Authorized User
 
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
Default 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.
 
Old January 28th, 2015, 04:08 PM
Wrox Author
 
Join Date: Oct 2006
Posts: 36
Thanks: 1
Thanked 5 Times in 5 Posts
Default

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
 
Old February 3rd, 2015, 02:30 PM
Registered User
 
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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. :)
 
Old March 15th, 2015, 09:13 PM
Authorized User
 
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
Default 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!
 
Old March 16th, 2015, 05:22 AM
Registered User
 
Join Date: Jan 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Brilliant

Hi Dave,

Not late at all. Ill try this when I get home tonight.

Thanks so much.
Music





Similar Threads
Thread Thread Starter Forum Replies Last Post
Learning Entity Framework 6, visual basic .net 2013 amc4042 .NET 4.5.1 and Visual Studio 2013 General Discussions 3 August 8th, 2014 10:23 AM
problem creating entity data model Kourosh94 ASP.NET 4.5 General Discussion 0 December 7th, 2013 03:56 PM
entity data model problem and maximum exceeded errors Caden11998 ASP.NET 4 General Discussion 0 August 29th, 2012 11:55 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
confusing in ADO.NET Entity Data Model,Linq to sql angelboy ADO.NET 5 November 21st, 2008 05:01 PM





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