(X) Hide this SilverlightShow next training events: Getting started with the Silverlight 5 Beta - a free 1 hour webinar on May 11th, by Michael Crump. Join at 10 am PST.
XNA for Windows Phone 7 - a 3 day training by MCC Peter Kuhn. June 1-3, 9 am - 1.30 pm PST. Sign up early-bird for $199.
Skip Navigation LinksHome / News / View News

Creating a Relationship on the UserRegistrations Table

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on May 11, 2011
(0 votes)
Tags: LightSwitch , Richard Waddell
SilverlightShow Page for all Silverlight and Windows Phone 7 (WP7) things on Twitter

Richard Waddell discusses how to create a User Registration with multiple relationships in LightSwitch.

Source: LightSwitch Help Website

Often we don’t care who the logged-in User is because we can control what they can do through Roles and Permissions. But if the User is a member of some group, it would be handy to place the Users table in a many-to-one relationship with that group. In this example the groups are SalesTeams made up of SalesPersons. All Sales made by a particular team are accessible only by members of that team.

To make that happen a new User is created, if necessary, when a SalesPerson is created. Since a SalesPerson is in a many-to-one relationship with SalesTeam, so is the User. This article shows you how to create the UserRegistration and then two ways to identify the SalesPerson associated with the logged-in User and thereby the relationship with SalesTeam and Sales.


Comments RSS RSS
No comments

Add Comment


Please add 6 and 7 and type the answer here: