I am reading this book via the Wrox 24/7 Books Online. I am using Visual Studio 2008 Professional and SQL Server 2008.
Following the examples in chapter 2 - Adding a Record section, when I run the application as instructed I get an error.
"Error 1 The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Users\x2ws\Documents\Visual Studio 2008\Projects\PaidTimeOffSolution\PaidTimeOffUI\De fault.aspx.cs 18 9 http://localhost/PaidTimeOffUI/"
"Error 2 The type 'System.Data.Linq.Table`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Users\x2ws\Documents\Visual Studio 2008\Projects\PaidTimeOffSolution\PaidTimeOffUI\De fault.aspx.cs 34 9 http://localhost/PaidTimeOffUI/"
"Error 3 'System.Data.Linq.Table`1<V2.PaidTimeOffDAL.ENTUse rAccount>' does not contain a definition for 'InsertOnSubmit' and no extension method 'InsertOnSubmit' accepting a first argument of type 'System.Data.Linq.Table`1<V2.PaidTimeOffDAL.ENTUse rAccount>' could be found (are you missing a using directive or an assembly reference?) C:\Users\x2ws\Documents\Visual Studio 2008\Projects\PaidTimeOffSolution\PaidTimeOffUI\De fault.aspx.cs 34 28 http://localhost/PaidTimeOffUI/"
"Error 4 'System.Data.Linq.Table`1<V2.PaidTimeOffDAL.ENTUse rAccount>' does not contain a definition for 'SubmitChanges' and no extension method 'SubmitChanges' accepting a first argument of type 'System.Data.Linq.Table`1<V2.PaidTimeOffDAL.ENTUse rAccount>' could be found (are you missing a using directive or an assembly reference?) C:\Users\x2ws\Documents\Visual Studio 2008\Projects\PaidTimeOffSolution\PaidTimeOffUI\De fault.aspx.cs 36 28 http://localhost/PaidTimeOffUI/"
I am using the following in my default.aspx.cs file:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using V2.PaidTimeOffDAL;
Any help is greatly appreciated.