#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.1433
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </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="Telefony")]
public partial class TelefonyDataContext : System.Data.Linq.DataContext
{
	
	private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
	
  #region Extensibility Method Definitions
  partial void OnCreated();
  partial void InsertListaOsob(ListaOsob instance);
  partial void UpdateListaOsob(ListaOsob instance);
  partial void DeleteListaOsob(ListaOsob instance);
  #endregion
	
	public TelefonyDataContext() : 
			base(global::System.Configuration.ConfigurationManager.ConnectionStrings["TelefonyConnectionString"].ConnectionString, mappingSource)
	{
		OnCreated();
	}
	
	public TelefonyDataContext(string connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public TelefonyDataContext(System.Data.IDbConnection connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public TelefonyDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public TelefonyDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public System.Data.Linq.Table<ListaOsob> ListaOsobs
	{
		get
		{
			return this.GetTable<ListaOsob>();
		}
	}
}

[Table(Name="dbo.ListaOsob")]
public partial class ListaOsob : 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 System.Nullable<int> _Wiek;
	
    #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 OnWiekChanging(System.Nullable<int> value);
    partial void OnWiekChanged();
    #endregion
	
	public ListaOsob()
	{
		OnCreated();
	}
	
	[Column(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();
			}
		}
	}
	
	[Column(Storage="_Imię", DbType="NVarChar(MAX)")]
	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();
			}
		}
	}
	
	[Column(Storage="_Nazwisko", DbType="NVarChar(MAX)")]
	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();
			}
		}
	}
	
	[Column(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();
			}
		}
	}
	
	[Column(Storage="_Wiek", DbType="Int")]
	public System.Nullable<int> Wiek
	{
		get
		{
			return this._Wiek;
		}
		set
		{
			if ((this._Wiek != value))
			{
				this.OnWiekChanging(value);
				this.SendPropertyChanging();
				this._Wiek = value;
				this.SendPropertyChanged("Wiek");
				this.OnWiekChanged();
			}
		}
	}
	
	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
