#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 LinqToSqlCwiczenia
{
	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 InsertOsoba(Osoba instance);
    partial void UpdateOsoba(Osoba instance);
    partial void DeleteOsoba(Osoba instance);
    partial void InsertRozmowy(Rozmowy instance);
    partial void UpdateRozmowy(Rozmowy instance);
    partial void DeleteRozmowy(Rozmowy instance);
    partial void InsertTable(Table instance);
    partial void UpdateTable(Table instance);
    partial void DeleteTable(Table instance);
    #endregion
		
		public WpisyDataContext() : 
				base(global::LinqToSqlCwiczenia.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<Osoba> Osobas
		{
			get
			{
				return this.GetTable<Osoba>();
			}
		}
		
		public System.Data.Linq.Table<Rozmowy> Rozmowies
		{
			get
			{
				return this.GetTable<Rozmowy>();
			}
		}
		
		public System.Data.Linq.Table<Table> Tables
		{
			get
			{
				return this.GetTable<Table>();
			}
		}
		
		public System.Data.Linq.Table<View> Views
		{
			get
			{
				return this.GetTable<View>();
			}
		}
		
		[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.[Procedure]")]
		public ISingleResult<ProcedureResult> Procedure()
		{
			IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())));
			return ((ISingleResult<ProcedureResult>)(result.ReturnValue));
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Osoby")]
	public partial class Osoba : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _Id;
		
		private string _Imię;
		
		private string _Nazwisko;
		
		private System.Nullable<int> _NumerTelefonu;
		
		private string _Email;
		
		private int _Wiek;
		
		private EntitySet<Rozmowy> _Rozmowies;
		
    #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 OnImięChanging(string value);
    partial void OnImięChanged();
    partial void OnNazwiskoChanging(string value);
    partial void OnNazwiskoChanged();
    partial void OnNumerTelefonuChanging(System.Nullable<int> value);
    partial void OnNumerTelefonuChanged();
    partial void OnEmailChanging(string value);
    partial void OnEmailChanged();
    partial void OnWiekChanging(int value);
    partial void OnWiekChanged();
    #endregion
		
		public Osoba()
		{
			this._Rozmowies = new EntitySet<Rozmowy>(new Action<Rozmowy>(this.attach_Rozmowies), new Action<Rozmowy>(this.detach_Rozmowies));
			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="_Imię", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Imię
		{
			get
			{
				return this._Imię;
			}
			set
			{
				if ((this._Imię != value))
				{
					this.OnImięChanging(value);
					this.SendPropertyChanging();
					this._Imię = value;
					this.SendPropertyChanged("Imię");
					this.OnImięChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Nazwisko", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Nazwisko
		{
			get
			{
				return this._Nazwisko;
			}
			set
			{
				if ((this._Nazwisko != value))
				{
					this.OnNazwiskoChanging(value);
					this.SendPropertyChanging();
					this._Nazwisko = value;
					this.SendPropertyChanged("Nazwisko");
					this.OnNazwiskoChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumerTelefonu", DbType="Int")]
		public System.Nullable<int> NumerTelefonu
		{
			get
			{
				return this._NumerTelefonu;
			}
			set
			{
				if ((this._NumerTelefonu != value))
				{
					this.OnNumerTelefonuChanging(value);
					this.SendPropertyChanging();
					this._NumerTelefonu = value;
					this.SendPropertyChanged("NumerTelefonu");
					this.OnNumerTelefonuChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Email", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Email
		{
			get
			{
				return this._Email;
			}
			set
			{
				if ((this._Email != value))
				{
					this.OnEmailChanging(value);
					this.SendPropertyChanging();
					this._Email = value;
					this.SendPropertyChanged("Email");
					this.OnEmailChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Wiek", DbType="Int NOT NULL")]
		public int Wiek
		{
			get
			{
				return this._Wiek;
			}
			set
			{
				if ((this._Wiek != value))
				{
					this.OnWiekChanging(value);
					this.SendPropertyChanging();
					this._Wiek = value;
					this.SendPropertyChanged("Wiek");
					this.OnWiekChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Osoba_Rozmowy", Storage="_Rozmowies", ThisKey="Id", OtherKey="IdOsoby")]
		public EntitySet<Rozmowy> Rozmowies
		{
			get
			{
				return this._Rozmowies;
			}
			set
			{
				this._Rozmowies.Assign(value);
			}
		}
		
		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));
			}
		}
		
		private void attach_Rozmowies(Rozmowy entity)
		{
			this.SendPropertyChanging();
			entity.Osoba = this;
		}
		
		private void detach_Rozmowies(Rozmowy entity)
		{
			this.SendPropertyChanging();
			entity.Osoba = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Rozmowy")]
	public partial class Rozmowy : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _Id;
		
		private int _IdOsoby;
		
		private System.DateTime _Data;
		
		private string _Rozmówca;
		
		private EntityRef<Osoba> _Osoba;
		
    #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 OnIdOsobyChanging(int value);
    partial void OnIdOsobyChanged();
    partial void OnDataChanging(System.DateTime value);
    partial void OnDataChanged();
    partial void OnRozmówcaChanging(string value);
    partial void OnRozmówcaChanged();
    #endregion
		
		public Rozmowy()
		{
			this._Osoba = default(EntityRef<Osoba>);
			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="_IdOsoby", DbType="Int NOT NULL")]
		public int IdOsoby
		{
			get
			{
				return this._IdOsoby;
			}
			set
			{
				if ((this._IdOsoby != value))
				{
					if (this._Osoba.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnIdOsobyChanging(value);
					this.SendPropertyChanging();
					this._IdOsoby = value;
					this.SendPropertyChanged("IdOsoby");
					this.OnIdOsobyChanged();
				}
			}
		}
		
		[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="_Rozmówca", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Rozmówca
		{
			get
			{
				return this._Rozmówca;
			}
			set
			{
				if ((this._Rozmówca != value))
				{
					this.OnRozmówcaChanging(value);
					this.SendPropertyChanging();
					this._Rozmówca = value;
					this.SendPropertyChanged("Rozmówca");
					this.OnRozmówcaChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Osoba_Rozmowy", Storage="_Osoba", ThisKey="IdOsoby", OtherKey="Id", IsForeignKey=true)]
		public Osoba Osoba
		{
			get
			{
				return this._Osoba.Entity;
			}
			set
			{
				Osoba previousValue = this._Osoba.Entity;
				if (((previousValue != value) 
							|| (this._Osoba.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Osoba.Entity = null;
						previousValue.Rozmowies.Remove(this);
					}
					this._Osoba.Entity = value;
					if ((value != null))
					{
						value.Rozmowies.Add(this);
						this._IdOsoby = value.Id;
					}
					else
					{
						this._IdOsoby = default(int);
					}
					this.SendPropertyChanged("Osoba");
				}
			}
		}
		
		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));
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.[Table]")]
	public partial class Table : 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 Table()
		{
			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));
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.[View]")]
	public partial class View
	{
		
		private int _Id;
		
		private string _Imię;
		
		private string _Nazwisko;
		
		private System.Nullable<int> _NumerTelefonu;
		
		private string _Email;
		
		private int _Wiek;
		
		public View()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="Int NOT NULL")]
		public int Id
		{
			get
			{
				return this._Id;
			}
			set
			{
				if ((this._Id != value))
				{
					this._Id = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Imię", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Imię
		{
			get
			{
				return this._Imię;
			}
			set
			{
				if ((this._Imię != value))
				{
					this._Imię = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Nazwisko", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Nazwisko
		{
			get
			{
				return this._Nazwisko;
			}
			set
			{
				if ((this._Nazwisko != value))
				{
					this._Nazwisko = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumerTelefonu", DbType="Int")]
		public System.Nullable<int> NumerTelefonu
		{
			get
			{
				return this._NumerTelefonu;
			}
			set
			{
				if ((this._NumerTelefonu != value))
				{
					this._NumerTelefonu = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Email", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Email
		{
			get
			{
				return this._Email;
			}
			set
			{
				if ((this._Email != value))
				{
					this._Email = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Wiek", DbType="Int NOT NULL")]
		public int Wiek
		{
			get
			{
				return this._Wiek;
			}
			set
			{
				if ((this._Wiek != value))
				{
					this._Wiek = value;
				}
			}
		}
	}
	
	public partial class ProcedureResult
	{
		
		private int _Id;
		
		private string _Imię;
		
		private string _Nazwisko;
		
		private System.Nullable<int> _NumerTelefonu;
		
		private string _Email;
		
		private int _Wiek;
		
		public ProcedureResult()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="Int NOT NULL")]
		public int Id
		{
			get
			{
				return this._Id;
			}
			set
			{
				if ((this._Id != value))
				{
					this._Id = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Imię", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Imię
		{
			get
			{
				return this._Imię;
			}
			set
			{
				if ((this._Imię != value))
				{
					this._Imię = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Nazwisko", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Nazwisko
		{
			get
			{
				return this._Nazwisko;
			}
			set
			{
				if ((this._Nazwisko != value))
				{
					this._Nazwisko = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumerTelefonu", DbType="Int")]
		public System.Nullable<int> NumerTelefonu
		{
			get
			{
				return this._NumerTelefonu;
			}
			set
			{
				if ((this._NumerTelefonu != value))
				{
					this._NumerTelefonu = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Email", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
		public string Email
		{
			get
			{
				return this._Email;
			}
			set
			{
				if ((this._Email != value))
				{
					this._Email = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Wiek", DbType="Int NOT NULL")]
		public int Wiek
		{
			get
			{
				return this._Wiek;
			}
			set
			{
				if ((this._Wiek != value))
				{
					this._Wiek = value;
				}
			}
		}
	}
}
#pragma warning restore 1591
