#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.4927
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Example
{
	using System.Data.Linq;
	using System.Data.Linq.Mapping;
	using System.Data;
	using System.Collections.Generic;
	using System.Reflection;
	using System.Linq;
	using System.Linq.Expressions;
	using System.ComponentModel;
	using System;
	
	
	[System.Data.Linq.Mapping.DatabaseAttribute(Name="TestDb")]
	public partial class DataClasses1DataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InsertDial(Dial instance);
    partial void UpdateDial(Dial instance);
    partial void DeleteDial(Dial instance);
    #endregion
		
		public DataClasses1DataContext() : 
				base(global::System.Configuration.ConfigurationManager.ConnectionStrings["TestDbConnectionString"].ConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public DataClasses1DataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public DataClasses1DataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public DataClasses1DataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public DataClasses1DataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<DetailTable> DetailTables
		{
			get
			{
				return this.GetTable<DetailTable>();
			}
		}
		
		public System.Data.Linq.Table<Dial> Dials
		{
			get
			{
				return this.GetTable<Dial>();
			}
		}
	}
	
	[Table(Name="dbo.DetailTable")]
	public partial class DetailTable
	{
		
		private string _PhoneNum;
		
		private string _DestName;
		
		private int _DialID;
		
		public DetailTable()
		{
		}
		
		[Column(Storage="_PhoneNum", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string PhoneNum
		{
			get
			{
				return this._PhoneNum;
			}
			set
			{
				if ((this._PhoneNum != value))
				{
					this._PhoneNum = value;
				}
			}
		}
		
		[Column(Storage="_DestName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string DestName
		{
			get
			{
				return this._DestName;
			}
			set
			{
				if ((this._DestName != value))
				{
					this._DestName = value;
				}
			}
		}
		
		[Column(Storage="_DialID", DbType="Int NOT NULL")]
		public int DialID
		{
			get
			{
				return this._DialID;
			}
			set
			{
				if ((this._DialID != value))
				{
					this._DialID = value;
				}
			}
		}
	}
	
	[Table(Name="dbo.Dials")]
	public partial class Dial : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _DialID;
		
		private string _SimpleText;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnDialIDChanging(int value);
    partial void OnDialIDChanged();
    partial void OnSimpleTextChanging(string value);
    partial void OnSimpleTextChanged();
    #endregion
		
		public Dial()
		{
			OnCreated();
		}
		
		[Column(Storage="_DialID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int DialID
		{
			get
			{
				return this._DialID;
			}
			set
			{
				if ((this._DialID != value))
				{
					this.OnDialIDChanging(value);
					this.SendPropertyChanging();
					this._DialID = value;
					this.SendPropertyChanged("DialID");
					this.OnDialIDChanged();
				}
			}
		}
		
		[Column(Storage="_SimpleText", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string SimpleText
		{
			get
			{
				return this._SimpleText;
			}
			set
			{
				if ((this._SimpleText != value))
				{
					this.OnSimpleTextChanging(value);
					this.SendPropertyChanging();
					this._SimpleText = value;
					this.SendPropertyChanged("SimpleText");
					this.OnSimpleTextChanged();
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
#pragma warning restore 1591
