I've found a million examples of how this is supposed to work, but I can't figure out why it doesn't recognize the class properly, as if it weren't marked "partial". Here's my partial class to allow me to define my DB connection string in a config file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration; // For Reading Connection String from Web.Config
namespace PSDataClasses
{
public partial class DataClassesDataContext
{
public DataClassesDataContext() : base(ConfigurationManager.ConnectionStrings["PSDataClasses.Properties.Settings.DBConnectionString"].ConnectionString)
{
OnCreated();
}
}
}
But OnCreated() does not exist in the current context, and it thinks my class is an object...what am I missing?