MSDN Archive Home
Help and FAQs
LINQ enabled Personal Web Site Starter kit
All Resource Updates
Change History (all pages)
Resource Page Description
Rewrite of the original Personal Web Starter Kit using LINQ for the data tier rather than stored procedures and ADO. The starter kit manages images in a SQL database by album.
This project is a revision of the original Personal Web Starter Kit which was written as an introduction to Visual Studio 2005. This verision updates the original project to replace the ADO data access tier with one based on LINQ which was introduced with Visual Studio 2008. This sample demonstrates how to perform standard CRUD (Create, Read, Update, Delete) operations against a SQL Express or SQL Server database to manage a set of photo albums. For this update, the following changes were made:
Remove the Photo and Album business classes and replaced them with ones generated by the LINQ to SQL designer (in the Personal.dbml) file.
Removed the need for custom stored procedures for each of the CRUD operations.
Refactored the dynamic select statement selection repeated in the GetFirstPhoto and GetPhoto stored procedures into a single VB method which dynamically builds on the LINQ query using the composable nature of LINQ.
Applies randomizing logic for selecting a random Album by using a scalar function in the database.
Use LINQ to Objects to declaritivly add photos from the Update directory rather than using an iterative process (see Admin/Photos.aspx.vb)
Feb 10 2008 at 10:14 PM
, version 2
Sign in to add a comment
Sun Feb 10 2008 at 8:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.