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

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;



[System.Data.Linq.Mapping.DatabaseAttribute(Name="SQL_Data")]
public partial class DataClassesDataContext : System.Data.Linq.DataContext
{
	
	private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
	
  #region Extensibility Method Definitions
  partial void OnCreated();
  partial void Insert仓库(仓库 instance);
  partial void Update仓库(仓库 instance);
  partial void Delete仓库(仓库 instance);
  #endregion
	
	public DataClassesDataContext() : 
			base(global::System.Configuration.ConfigurationManager.ConnectionStrings["SQL_DataConnectionString"].ConnectionString, mappingSource)
	{
		OnCreated();
	}
	
	public DataClassesDataContext(string connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public DataClassesDataContext(System.Data.IDbConnection connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public DataClassesDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public DataClassesDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public System.Data.Linq.Table<仓库> 仓库
	{
		get
		{
			return this.GetTable<仓库>();
		}
	}
}

[Table(Name="dbo.仓库")]
public partial class 仓库 : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _仓库ID;
	
	private string _仓库号;
	
	private string _城市;
	
	private System.Nullable<int> _面积;
	
	private System.Nullable<System.DateTime> _创建时间;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void On仓库IDChanging(int value);
    partial void On仓库IDChanged();
    partial void On仓库号Changing(string value);
    partial void On仓库号Changed();
    partial void On城市Changing(string value);
    partial void On城市Changed();
    partial void On面积Changing(System.Nullable<int> value);
    partial void On面积Changed();
    partial void On创建时间Changing(System.Nullable<System.DateTime> value);
    partial void On创建时间Changed();
    #endregion
	
	public 仓库()
	{
		OnCreated();
	}
	
	[Column(Storage="_仓库ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int 仓库ID
	{
		get
		{
			return this._仓库ID;
		}
		set
		{
			if ((this._仓库ID != value))
			{
				this.On仓库IDChanging(value);
				this.SendPropertyChanging();
				this._仓库ID = value;
				this.SendPropertyChanged("仓库ID");
				this.On仓库IDChanged();
			}
		}
	}
	
	[Column(Storage="_仓库号", DbType="VarChar(50)")]
	public string 仓库号
	{
		get
		{
			return this._仓库号;
		}
		set
		{
			if ((this._仓库号 != value))
			{
				this.On仓库号Changing(value);
				this.SendPropertyChanging();
				this._仓库号 = value;
				this.SendPropertyChanged("仓库号");
				this.On仓库号Changed();
			}
		}
	}
	
	[Column(Storage="_城市", DbType="VarChar(50)")]
	public string 城市
	{
		get
		{
			return this._城市;
		}
		set
		{
			if ((this._城市 != value))
			{
				this.On城市Changing(value);
				this.SendPropertyChanging();
				this._城市 = value;
				this.SendPropertyChanged("城市");
				this.On城市Changed();
			}
		}
	}
	
	[Column(Storage="_面积", DbType="Int")]
	public System.Nullable<int> 面积
	{
		get
		{
			return this._面积;
		}
		set
		{
			if ((this._面积 != value))
			{
				this.On面积Changing(value);
				this.SendPropertyChanging();
				this._面积 = value;
				this.SendPropertyChanged("面积");
				this.On面积Changed();
			}
		}
	}
	
	[Column(Storage="_创建时间", DbType="DateTime")]
	public System.Nullable<System.DateTime> 创建时间
	{
		get
		{
			return this._创建时间;
		}
		set
		{
			if ((this._创建时间 != value))
			{
				this.On创建时间Changing(value);
				this.SendPropertyChanging();
				this._创建时间 = value;
				this.SendPropertyChanged("创建时间");
				this.On创建时间Changed();
			}
		}
	}
	
	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
