Sharing the goodness…
Beth Massi is a Senior Program Manager on the Visual Studio team at Microsoft and a community champion for business application developers. Learn more about Beth.
More videos »
UPDATE: If you are looking for the Visual Studio 2012 version see: Contoso Construction - LightSwitch Advanced Sample (Visual Studio 2012)
Last week I demonstrated a more advanced sample at TechEd and showed different levels of customization that you can do to your LightSwitch applications as a professional developer by putting your own code into the client and server tiers. You can watch the session where I went through it here: Extending Microsoft Visual Studio LightSwitch Applications (also check out additional resources from my trip report I posted yesterday).
Download the Contoso Construction Sample
This sample demonstrates some of the more advanced code, screen, and data customizations you can do with Visual Studio LightSwitch Beta 2 as a professional developer (you get paid to write code). If you are not a professional developer or do not have any experience with LightSwitch, please see the Getting Started section of the LightSwitch Developer Center for step-by-step walkthroughs and How-to videos. Also please make sure you read the setup instructions below.
Features of this sample include:
You will need Visual Studio LightSwitch Beta 2 installed to run this sample. Before building the sample you will need to set up a few things so that all the pieces work. Once you complete the following steps, press F5 to run the application in debug mode.
You will need the following extensions installed to load this application: http://code.msdn.microsoft.com/Filter-Control-for-Visual-90fb8e93 http://code.msdn.microsoft.com/Excel-Importer-for-Visual-61dd4a90 And the Bing Map control from the Training Kit: http://go.microsoft.com/?linkid=9741442
These are .VSIX packages and are also located in the root folder of this sample. Close Visual Studio and then double-click them to install.
In order to use the Bing Maps Control and the Bing Maps Web Services, you need a Bing Maps Key. Getting the key is a free and straightforward process you can complete by following these steps:
When you create, update or cancel an appointment in the system between a customer and an employee emails can be sent. In order for the emailing of appointments to work you must add the correct settings for your SMTP server in the ServerGenerated project's Web.config:
<add key="SMTPServer" value="smtp.mydomain.com" /> <add key="SMTPPort" value="25" /> <add key="SMTPUserId" value="admin" /> <add key="SMTPPassword" value="password" />
The system is set to Forms Authentication but if you change it to Windows Authenticaion then in order for the "My Appointments" feature to work you will need to add yourself into the Employees table and specify your domain name as the user name. Make sure to specify a valid email address if you want to email appointments.
In order to import data on the Materials Catalog screen, copy the StructuralMaterials.xls located in the root of this sample to your My Documents folder first. Then click the Import from Excel button on the screen and select the spreadsheet. You can them map the columns in the spreadsheet to the entity properties and the data from the spreadsheet will appear as new rows on the Materials Catalog. Click Save to send the data to the database.
You can get a good understanding of more advanced LightSwitch features by working through the LightSwitch Training Kit. If you look under the “LightSwitch Advanced features” section on the right-hand sidebar on the opening page of the kit you will see the demos and labs.
Here are some more resources of Visual Studio LightSwitch to explore:
For questions related to this sample please contact me here. For other LightSwitch questions and troubleshooting please visit the LightSwitch Forums.
Thanks for another great sample!
Just one note about Filter Control - it's a fantastic control and I hope the handling of the exception I mentioned here:
will be fixed soon.
Excellent video, Beth. Videos like this showing useful examples are terrific--good info, nice presentation. Keep up the great work.
Like many people, i have this message when your Contoso application start :
"...The database '2F2EAC41F87EB280337C4343CFF80203_L STUDIO 2010\PROJECTS\CONTOSOCONSTRUCTION\CONTOSOCONSTRUCTION\BIN\DATA\APPLICATIONDATABASE.MDF' cannot be opened because it is version 661. This server supports version 612 and earlier. A downgrade path is not supported.
Cannot open user default database. Login failed.
Login failed for user 'HAL\StealthWise'."
I have read your blog "Attaching a Local SQL Server Database Using sqlcmd". But, that don't work.
I have also change the database tools option from sqlexpress to HAL\SQLSERVERR2.
Can you help me ?
Hi Beth, thanks for the article.
I do have a question about Lightswitch and maybe it's the same for Silverlight. How come I need to do so many refreshes after I've modified data on a screen. For example if you add a detail item and go back to the master item the detail don't show unless you do a refresh.
When you install LightSwitch Beta 2 it will install SQL Express edition. You will need that to run the sample. It sounds like you don't have it installed.
Do we have chart controls added for this application to show data?
Make the images in this post clickable. They are unreadable in Firefox or IE9.
This is great. Is there a way to send Task requests to Outlook using a similar function to the way you're sending the appointment requests?
Hi, Beth! Nice post!
Is it possible to uso Geo Tags with bing control?
Have you used the xCode logo from Mac in this? The icon for "Search Projects"