locked
Multi-Company Lightswitch Application RRS feed

  • Question

  • I know there are questions already out there for this but they do not seem to adequitely answer the question.

    I am writing an application in Lightswitch (VB) to handle warranty issues for a chain of retail stores. I have already used a WCF RIA service to link the application users (forms authentication) by GUID to a table to store additional user data such as phone details, address, etc. There is also a field in the user table called Franchise that is linked to another table (MS SQL backend) called franchises, which lists all the franchises using the application. This table stores phone and address details for each franchise as well. The key for this table is a six character string.

    After the user logs in, I want the user to only be able to see data belonging to the franchise to which they belong. There are three main tables, Customers, Suppliers & Issues, all of which are also linked to Franchises (at this stage, no data is shared between the franchises).

    The way of writing queries in Lightswitch seems to be confusing me. How can I filter by the current logged in user with my database schema?

    Monday, December 3, 2012 8:42 AM

Answers

All replies