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 July 24th, 2013, 11:22 PM
Registered User
 
Join Date: Jul 2013
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Exclamation Validate Unique Key

Hello To Everyone,

Can you please tell me how can I validate unique key option. I mean I set photo album name as unique key and I want if someone try to create another album with the same name to get an error msg.

Thank you
 
Old July 30th, 2013, 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,

This is not easy to do with EF. Take a look here for some ideas on how it can be accomplished

http://blogs.msdn.com/b/efdesign/arc...framework.aspx
http://stackoverflow.com/questions/5...-first/5701702

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:
sotos (August 1st, 2013)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 6: Unique Key Constraint Violation deebazz BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 0 July 10th, 2009 08:17 AM
Unique Key by concatenating military time and date code_lover C++ Programming 0 August 8th, 2008 06:09 AM
Access nested collection with unique Key jani Excel VBA 0 May 21st, 2008 04:02 PM
Does "key" imply "unique"? shumba XML 1 April 3rd, 2006 04:17 PM
unique primary key field in CR kelvinklein82 BOOK: Professional Crystal Reports for VS.NET 0 December 29th, 2004 11:52 AM





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