Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : 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 June 11th, 2014, 10:53 PM
Registered User
 
Join Date: May 2014
Posts: 8
Thanks: 4
Thanked 0 Times in 0 Posts
Default Unable to add Navigation Property

Hello Sir , First of all Thanks for making such a nice book, which simple and deep explanation .Sir I am unable to add Navigation Property On TRY OUT-pg497-pg500, which maps collection in edmx file i had recreated tables and relation ship many times but unable to get the Navigation Properties .
please help



thanks in advance
 
Old June 12th, 2014, 03:58 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,

Did you create the proper relationships between the primary key on one, and the foreign key in the other table in SQL Server?

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 June 12th, 2014, 12:56 PM
Registered User
 
Join Date: May 2014
Posts: 8
Thanks: 4
Thanked 0 Times in 0 Posts
Default

sir , i had dragged the id of table Photoalbum into the PhotoAlbumId of picture Table, but still i am not getting any Navigation Property.
I am not gettin My Table Name in the Add Button of the Update Table Wizard.Sir one more thing i have not understood the concept of Collection used in previous Try Out.



THANKS
REGARDS
NIKHIL

Last edited by nikhilrathi99; June 12th, 2014 at 01:36 PM..
 
Old June 12th, 2014, 02:03 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 there,

Did you update the EF model after you updated the database? Try right-clicking the EF model, choose Update Model from Database and then click OK to save the changes.

Collection are objects designed to hold zero or more other objects. Check out the following resources to learn more:

http://www.c-sharpcorner.com/UploadF...-with-C-Sharp/
http://geekswithblogs.net/BlackRabbi...ion-class.aspx

By the way, it would have been better if you's started a new thread for the question about collections as it is not related to the original topic of the Navigation properties.

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:
nikhilrathi99 (June 13th, 2014)
 
Old June 13th, 2014, 05:38 AM
Registered User
 
Join Date: May 2014
Posts: 8
Thanks: 4
Thanked 0 Times in 0 Posts
Default

sir actually i had detached the database few minutes back .But now i am not able to connect to the data base , thus i am not able to update the data base.
plz help
 
Old June 13th, 2014, 05:50 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Either attach it again, or try double-clicking the database file in the App_Data folder.

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:
nikhilrathi99 (June 13th, 2014)
 
Old June 13th, 2014, 06:51 AM
Registered User
 
Join Date: May 2014
Posts: 8
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Thanks sir problem solved

Last edited by nikhilrathi99; June 13th, 2014 at 06:54 AM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to switch themes after implementing Navigation bclark2137 BOOK: Beginning ASP.NET 4.5 : in C# and VB 6 January 26th, 2014 07:42 AM
How do I add additional item to the Navigation menu krahman01 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 June 7th, 2010 11:24 PM
Add parameter to "navigation" url - roy_mm Reporting Services 1 October 16th, 2006 07:00 AM
"Unable to set the FormulaArray property..." rduncan1 Excel VBA 2 August 18th, 2006 01:33 PM
how to add breadcrumb navigation to a LAMP site avail1now PHP How-To 0 February 17th, 2006 05:03 PM





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