Mega Code Archive
Creating LINQ to SQL Entities
File: ~\App_Code\Product.cs
using System;
using System.Data.Linq.Mapping;
[Table]
public class Product
{
[Column(IsPrimaryKey=true, IsDbGenerated=true)]
public int Id { get; set; }
[Column]
public string Title { get; set; }
[Column]
public string Director { get; set; }
[Column]
public DateTime DateReleased { get; set; }
[Column]
public decimal Totals { get; set; }
}
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Data.Linq" %>
File: Web.config