How to prevent duplicate records in a mapping table in MVC3? -



How to prevent duplicate records in a mapping table in MVC3? -

i have next tables:

client (pkey = clientid) user (pkey = userid) userclient (fkeys = clientid, userid)

when seek add together record (mapping) in userclient table such user-client pair should unique, allows duplicate records.

i want prevent that. meaning, when trying add together existing user-client pair should throw client side validation.

how can prevent entry of duplicate record in mapping table in mvc3?

it sounds want uniquly identify columns. yu can accomplish help of candidate key in sql server, not supported in entity framework.

entity framework: alternate solution using non primary unique keys in association

duplicates record rdbms

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

How do you set up a perforce server to work over the internet? -

ios - Lagging ScrollView with UIWebview inside -