Search Wiki:
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 at 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)
Last edited Feb 10 2008 at 10:19 PM  by jwooley, version 3
Page view tracker