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

namespace Model
{
	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;
	
	
	[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="Wpisy")]
	public partial class WpisyDataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InsertWpis(Wpis instance);
    partial void UpdateWpis(Wpis instance);
    partial void DeleteWpis(Wpis instance);
    #endregion
		
		public WpisyDataContext() : 
				base(global::Model.Properties.Settings.Default.WpisyConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public WpisyDataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public WpisyDataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public WpisyDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public WpisyDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<Wpis> Wpis
		{
			get
			{
				return this.GetTable<Wpis>();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.[Table]")]
	public partial class Wpis : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _Id;
		
		private string _NazwaUżytkownika;
		
		private string _Treść;
		
		private System.DateTime _Data;
		
		private string _AdresIP;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnIdChanging(int value);
    partial void OnIdChanged();
    partial void OnNazwaUżytkownikaChanging(string value);
    partial void OnNazwaUżytkownikaChanged();
    partial void OnTreśćChanging(string value);
    partial void OnTreśćChanged();
    partial void OnDataChanging(System.DateTime value);
    partial void OnDataChanged();
    partial void OnAdresIPChanging(string value);
    partial void OnAdresIPChanged();
    #endregion
		
		public Wpis()
		{
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="Int NOT NULL", IsPrimaryKey=true)]
		public int Id
		{
			get
			{
				return this._Id;
			}
			set
			{
				if ((this._Id != value))
				{
					this.OnIdChanging(value);
					this.SendPropertyChanging();
					this._Id = value;
					this.SendPropertyChanged("Id");
					this.OnIdChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NazwaUżytkownika", DbType="NVarChar(256) NOT NULL", CanBeNull=false)]
		public string NazwaUżytkownika
		{
			get
			{
				return this._NazwaUżytkownika;
			}
			set
			{
				if ((this._NazwaUżytkownika != value))
				{
					this.OnNazwaUżytkownikaChanging(value);
					this.SendPropertyChanging();
					this._NazwaUżytkownika = value;
					this.SendPropertyChanged("NazwaUżytkownika");
					this.OnNazwaUżytkownikaChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Treść", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Treść
		{
			get
			{
				return this._Treść;
			}
			set
			{
				if ((this._Treść != value))
				{
					this.OnTreśćChanging(value);
					this.SendPropertyChanging();
					this._Treść = value;
					this.SendPropertyChanged("Treść");
					this.OnTreśćChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="DateTime NOT NULL")]
		public System.DateTime Data
		{
			get
			{
				return this._Data;
			}
			set
			{
				if ((this._Data != value))
				{
					this.OnDataChanging(value);
					this.SendPropertyChanging();
					this._Data = value;
					this.SendPropertyChanged("Data");
					this.OnDataChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AdresIP", DbType="NVarChar(16) NOT NULL", CanBeNull=false)]
		public string AdresIP
		{
			get
			{
				return this._AdresIP;
			}
			set
			{
				if ((this._AdresIP != value))
				{
					this.OnAdresIPChanging(value);
					this.SendPropertyChanging();
					this._AdresIP = value;
					this.SendPropertyChanged("AdresIP");
					this.OnAdresIPChanged();
				}
			}
		}
		
		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
