#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行库版本:2.0.50727.1433
//
//     对此文件的更改可能会导致不正确的行为，并且如果
//     重新生成代码，这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace DynamicCompiler
{
	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="Database1")]
	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 InsertFunctionScript(FunctionScript instance);
    partial void UpdateFunctionScript(FunctionScript instance);
    partial void DeleteFunctionScript(FunctionScript instance);
    #endregion
		
		public DataClasses1DataContext() : 
				base(global::DynamicCompiler.Properties.Settings.Default.Database1ConnectionString, 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<FunctionScript> FunctionScript
		{
			get
			{
				return this.GetTable<FunctionScript>();
			}
		}
	}
	
	[Table(Name="dbo.FunctionScript")]
	public partial class FunctionScript : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _FunctionID;
		
		private string _FunctionName;
		
		private string _ClassName;
		
		private string _ClassNameSpace;
		
		private System.Xml.Linq.XElement _Parameters;
		
		private string _ReturnType;
		
		private string _ScriptBody;
		
		private System.Nullable<bool> _IsCompile;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnFunctionIDChanging(int value);
    partial void OnFunctionIDChanged();
    partial void OnFunctionNameChanging(string value);
    partial void OnFunctionNameChanged();
    partial void OnClassNameChanging(string value);
    partial void OnClassNameChanged();
    partial void OnClassNameSpaceChanging(string value);
    partial void OnClassNameSpaceChanged();
    partial void OnParametersChanging(System.Xml.Linq.XElement value);
    partial void OnParametersChanged();
    partial void OnReturnTypeChanging(string value);
    partial void OnReturnTypeChanged();
    partial void OnScriptBodyChanging(string value);
    partial void OnScriptBodyChanged();
    partial void OnIsCompileChanging(System.Nullable<bool> value);
    partial void OnIsCompileChanged();
    #endregion
		
		public FunctionScript()
		{
			OnCreated();
		}
		
		[Column(Storage="_FunctionID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int FunctionID
		{
			get
			{
				return this._FunctionID;
			}
			set
			{
				if ((this._FunctionID != value))
				{
					this.OnFunctionIDChanging(value);
					this.SendPropertyChanging();
					this._FunctionID = value;
					this.SendPropertyChanged("FunctionID");
					this.OnFunctionIDChanged();
				}
			}
		}
		
		[Column(Storage="_FunctionName", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
		public string FunctionName
		{
			get
			{
				return this._FunctionName;
			}
			set
			{
				if ((this._FunctionName != value))
				{
					this.OnFunctionNameChanging(value);
					this.SendPropertyChanging();
					this._FunctionName = value;
					this.SendPropertyChanged("FunctionName");
					this.OnFunctionNameChanged();
				}
			}
		}
		
		[Column(Storage="_ClassName", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
		public string ClassName
		{
			get
			{
				return this._ClassName;
			}
			set
			{
				if ((this._ClassName != value))
				{
					this.OnClassNameChanging(value);
					this.SendPropertyChanging();
					this._ClassName = value;
					this.SendPropertyChanged("ClassName");
					this.OnClassNameChanged();
				}
			}
		}
		
		[Column(Storage="_ClassNameSpace", DbType="VarChar(50)")]
		public string ClassNameSpace
		{
			get
			{
				return this._ClassNameSpace;
			}
			set
			{
				if ((this._ClassNameSpace != value))
				{
					this.OnClassNameSpaceChanging(value);
					this.SendPropertyChanging();
					this._ClassNameSpace = value;
					this.SendPropertyChanged("ClassNameSpace");
					this.OnClassNameSpaceChanged();
				}
			}
		}
		
		[Column(Storage="_Parameters", DbType="Xml", UpdateCheck=UpdateCheck.Never)]
		public System.Xml.Linq.XElement Parameters
		{
			get
			{
				return this._Parameters;
			}
			set
			{
				if ((this._Parameters != value))
				{
					this.OnParametersChanging(value);
					this.SendPropertyChanging();
					this._Parameters = value;
					this.SendPropertyChanged("Parameters");
					this.OnParametersChanged();
				}
			}
		}
		
		[Column(Storage="_ReturnType", DbType="VarChar(50)")]
		public string ReturnType
		{
			get
			{
				return this._ReturnType;
			}
			set
			{
				if ((this._ReturnType != value))
				{
					this.OnReturnTypeChanging(value);
					this.SendPropertyChanging();
					this._ReturnType = value;
					this.SendPropertyChanged("ReturnType");
					this.OnReturnTypeChanged();
				}
			}
		}
		
		[Column(Storage="_ScriptBody", DbType="VarChar(MAX)")]
		public string ScriptBody
		{
			get
			{
				return this._ScriptBody;
			}
			set
			{
				if ((this._ScriptBody != value))
				{
					this.OnScriptBodyChanging(value);
					this.SendPropertyChanging();
					this._ScriptBody = value;
					this.SendPropertyChanged("ScriptBody");
					this.OnScriptBodyChanged();
				}
			}
		}
		
		[Column(Storage="_IsCompile", DbType="Bit")]
		public System.Nullable<bool> IsCompile
		{
			get
			{
				return this._IsCompile;
			}
			set
			{
				if ((this._IsCompile != value))
				{
					this.OnIsCompileChanging(value);
					this.SendPropertyChanging();
					this._IsCompile = value;
					this.SendPropertyChanged("IsCompile");
					this.OnIsCompileChanged();
				}
			}
		}
		
		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
