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

namespace VideoCloop
{
	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="MainTempDB")]
	public partial class Lsc_VideoClubDataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InserttblCustomer(tblCustomer instance);
    partial void UpdatetblCustomer(tblCustomer instance);
    partial void DeletetblCustomer(tblCustomer instance);
    partial void InserttblLog(tblLog instance);
    partial void UpdatetblLog(tblLog instance);
    partial void DeletetblLog(tblLog instance);
    partial void InsertTypeMovie(TypeMovie instance);
    partial void UpdateTypeMovie(TypeMovie instance);
    partial void DeleteTypeMovie(TypeMovie instance);
    partial void InserttblTahvil(tblTahvil instance);
    partial void UpdatetblTahvil(tblTahvil instance);
    partial void DeletetblTahvil(tblTahvil instance);
    partial void InserttblTypeProduct(tblTypeProduct instance);
    partial void UpdatetblTypeProduct(tblTypeProduct instance);
    partial void DeletetblTypeProduct(tblTypeProduct instance);
    partial void InserttblUser(tblUser instance);
    partial void UpdatetblUser(tblUser instance);
    partial void DeletetblUser(tblUser instance);
    partial void InserttblUserType(tblUserType instance);
    partial void UpdatetblUserType(tblUserType instance);
    partial void DeletetblUserType(tblUserType instance);
    partial void InserttblMovie(tblMovie instance);
    partial void UpdatetblMovie(tblMovie instance);
    partial void DeletetblMovie(tblMovie instance);
    #endregion
		
		public Lsc_VideoClubDataContext() : 
				base(global::VideoCloop.Properties.Settings.Default.MainTempDBConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public Lsc_VideoClubDataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public Lsc_VideoClubDataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public Lsc_VideoClubDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public Lsc_VideoClubDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<tblCustomer> tblCustomers
		{
			get
			{
				return this.GetTable<tblCustomer>();
			}
		}
		
		public System.Data.Linq.Table<tblLog> tblLogs
		{
			get
			{
				return this.GetTable<tblLog>();
			}
		}
		
		public System.Data.Linq.Table<TypeMovie> TypeMovies
		{
			get
			{
				return this.GetTable<TypeMovie>();
			}
		}
		
		public System.Data.Linq.Table<tblTahvil> tblTahvils
		{
			get
			{
				return this.GetTable<tblTahvil>();
			}
		}
		
		public System.Data.Linq.Table<tblTypeProduct> tblTypeProducts
		{
			get
			{
				return this.GetTable<tblTypeProduct>();
			}
		}
		
		public System.Data.Linq.Table<tblUser> tblUsers
		{
			get
			{
				return this.GetTable<tblUser>();
			}
		}
		
		public System.Data.Linq.Table<tblUserType> tblUserTypes
		{
			get
			{
				return this.GetTable<tblUserType>();
			}
		}
		
		public System.Data.Linq.Table<xtblDaramadFilm> xtblDaramadFilms
		{
			get
			{
				return this.GetTable<xtblDaramadFilm>();
			}
		}
		
		public System.Data.Linq.Table<xtblTedadFilmMoshtari> xtblTedadFilmMoshtaris
		{
			get
			{
				return this.GetTable<xtblTedadFilmMoshtari>();
			}
		}
		
		public System.Data.Linq.Table<xtblDaryaftGorohFilm> xtblDaryaftGorohFilms
		{
			get
			{
				return this.GetTable<xtblDaryaftGorohFilm>();
			}
		}
		
		public System.Data.Linq.Table<xtblMovie> xtblMovies
		{
			get
			{
				return this.GetTable<xtblMovie>();
			}
		}
		
		public System.Data.Linq.Table<xtblTahvil> xtblTahvils
		{
			get
			{
				return this.GetTable<xtblTahvil>();
			}
		}
		
		public System.Data.Linq.Table<tblMovie> tblMovies
		{
			get
			{
				return this.GetTable<tblMovie>();
			}
		}
	}
	
	[Table(Name="dbo.tblCustomer")]
	public partial class tblCustomer : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _customerId;
		
		private string _Name;
		
		private string _SName;
		
		private string _DateBirth;
		
		private string _MeliCode;
		
		private string _Address;
		
		private EntitySet<tblTahvil> _tblTahvils;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OncustomerIdChanging(int value);
    partial void OncustomerIdChanged();
    partial void OnNameChanging(string value);
    partial void OnNameChanged();
    partial void OnSNameChanging(string value);
    partial void OnSNameChanged();
    partial void OnDateBirthChanging(string value);
    partial void OnDateBirthChanged();
    partial void OnMeliCodeChanging(string value);
    partial void OnMeliCodeChanged();
    partial void OnAddressChanging(string value);
    partial void OnAddressChanged();
    #endregion
		
		public tblCustomer()
		{
			this._tblTahvils = new EntitySet<tblTahvil>(new Action<tblTahvil>(this.attach_tblTahvils), new Action<tblTahvil>(this.detach_tblTahvils));
			OnCreated();
		}
		
		[Column(Storage="_customerId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int customerId
		{
			get
			{
				return this._customerId;
			}
			set
			{
				if ((this._customerId != value))
				{
					this.OncustomerIdChanging(value);
					this.SendPropertyChanging();
					this._customerId = value;
					this.SendPropertyChanged("customerId");
					this.OncustomerIdChanged();
				}
			}
		}
		
		[Column(Storage="_Name", DbType="NVarChar(50)")]
		public string Name
		{
			get
			{
				return this._Name;
			}
			set
			{
				if ((this._Name != value))
				{
					this.OnNameChanging(value);
					this.SendPropertyChanging();
					this._Name = value;
					this.SendPropertyChanged("Name");
					this.OnNameChanged();
				}
			}
		}
		
		[Column(Storage="_SName", DbType="NVarChar(50)")]
		public string SName
		{
			get
			{
				return this._SName;
			}
			set
			{
				if ((this._SName != value))
				{
					this.OnSNameChanging(value);
					this.SendPropertyChanging();
					this._SName = value;
					this.SendPropertyChanged("SName");
					this.OnSNameChanged();
				}
			}
		}
		
		[Column(Storage="_DateBirth", DbType="NVarChar(50)")]
		public string DateBirth
		{
			get
			{
				return this._DateBirth;
			}
			set
			{
				if ((this._DateBirth != value))
				{
					this.OnDateBirthChanging(value);
					this.SendPropertyChanging();
					this._DateBirth = value;
					this.SendPropertyChanged("DateBirth");
					this.OnDateBirthChanged();
				}
			}
		}
		
		[Column(Storage="_MeliCode", DbType="NVarChar(50)")]
		public string MeliCode
		{
			get
			{
				return this._MeliCode;
			}
			set
			{
				if ((this._MeliCode != value))
				{
					this.OnMeliCodeChanging(value);
					this.SendPropertyChanging();
					this._MeliCode = value;
					this.SendPropertyChanged("MeliCode");
					this.OnMeliCodeChanged();
				}
			}
		}
		
		[Column(Storage="_Address", DbType="NVarChar(150)")]
		public string Address
		{
			get
			{
				return this._Address;
			}
			set
			{
				if ((this._Address != value))
				{
					this.OnAddressChanging(value);
					this.SendPropertyChanging();
					this._Address = value;
					this.SendPropertyChanged("Address");
					this.OnAddressChanged();
				}
			}
		}
		
		[Association(Name="tblCustomer_tblTahvil", Storage="_tblTahvils", ThisKey="customerId", OtherKey="tahvilgirandeId")]
		public EntitySet<tblTahvil> tblTahvils
		{
			get
			{
				return this._tblTahvils;
			}
			set
			{
				this._tblTahvils.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_tblTahvils(tblTahvil entity)
		{
			this.SendPropertyChanging();
			entity.tblCustomer = this;
		}
		
		private void detach_tblTahvils(tblTahvil entity)
		{
			this.SendPropertyChanging();
			entity.tblCustomer = null;
		}
	}
	
	[Table(Name="dbo.tblLogs")]
	public partial class tblLog : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private decimal _RowLogID;
		
		private string _LogDescription;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnRowLogIDChanging(decimal value);
    partial void OnRowLogIDChanged();
    partial void OnLogDescriptionChanging(string value);
    partial void OnLogDescriptionChanged();
    #endregion
		
		public tblLog()
		{
			OnCreated();
		}
		
		[Column(Storage="_RowLogID", AutoSync=AutoSync.OnInsert, DbType="Decimal(18,0) NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public decimal RowLogID
		{
			get
			{
				return this._RowLogID;
			}
			set
			{
				if ((this._RowLogID != value))
				{
					this.OnRowLogIDChanging(value);
					this.SendPropertyChanging();
					this._RowLogID = value;
					this.SendPropertyChanged("RowLogID");
					this.OnRowLogIDChanged();
				}
			}
		}
		
		[Column(Storage="_LogDescription", DbType="NVarChar(150)")]
		public string LogDescription
		{
			get
			{
				return this._LogDescription;
			}
			set
			{
				if ((this._LogDescription != value))
				{
					this.OnLogDescriptionChanging(value);
					this.SendPropertyChanging();
					this._LogDescription = value;
					this.SendPropertyChanged("LogDescription");
					this.OnLogDescriptionChanged();
				}
			}
		}
		
		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));
			}
		}
	}
	
	[Table(Name="dbo.TypeMovie")]
	public partial class TypeMovie : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _TypeId;
		
		private string _TypeFilm;
		
		private EntitySet<tblMovie> _tblMovies;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnTypeIdChanging(int value);
    partial void OnTypeIdChanged();
    partial void OnTypeFilmChanging(string value);
    partial void OnTypeFilmChanged();
    #endregion
		
		public TypeMovie()
		{
			this._tblMovies = new EntitySet<tblMovie>(new Action<tblMovie>(this.attach_tblMovies), new Action<tblMovie>(this.detach_tblMovies));
			OnCreated();
		}
		
		[Column(Storage="_TypeId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int TypeId
		{
			get
			{
				return this._TypeId;
			}
			set
			{
				if ((this._TypeId != value))
				{
					this.OnTypeIdChanging(value);
					this.SendPropertyChanging();
					this._TypeId = value;
					this.SendPropertyChanged("TypeId");
					this.OnTypeIdChanged();
				}
			}
		}
		
		[Column(Storage="_TypeFilm", DbType="NVarChar(50)")]
		public string TypeFilm
		{
			get
			{
				return this._TypeFilm;
			}
			set
			{
				if ((this._TypeFilm != value))
				{
					this.OnTypeFilmChanging(value);
					this.SendPropertyChanging();
					this._TypeFilm = value;
					this.SendPropertyChanged("TypeFilm");
					this.OnTypeFilmChanged();
				}
			}
		}
		
		[Association(Name="TypeMovie_tblMovie", Storage="_tblMovies", ThisKey="TypeId", OtherKey="TypeFilmId")]
		public EntitySet<tblMovie> tblMovies
		{
			get
			{
				return this._tblMovies;
			}
			set
			{
				this._tblMovies.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_tblMovies(tblMovie entity)
		{
			this.SendPropertyChanging();
			entity.TypeMovie = this;
		}
		
		private void detach_tblMovies(tblMovie entity)
		{
			this.SendPropertyChanging();
			entity.TypeMovie = null;
		}
	}
	
	[Table(Name="dbo.tblTahvil")]
	public partial class tblTahvil : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _TahvilId;
		
		private string _DateTahvil;
		
		private System.Nullable<int> _FilmId;
		
		private System.Nullable<int> _tahvilgirandeId;
		
		private string _DateBazgasht;
		
		private string _PriceTotal;
		
		private EntityRef<tblCustomer> _tblCustomer;
		
		private EntityRef<tblMovie> _tblMovie;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnTahvilIdChanging(int value);
    partial void OnTahvilIdChanged();
    partial void OnDateTahvilChanging(string value);
    partial void OnDateTahvilChanged();
    partial void OnFilmIdChanging(System.Nullable<int> value);
    partial void OnFilmIdChanged();
    partial void OntahvilgirandeIdChanging(System.Nullable<int> value);
    partial void OntahvilgirandeIdChanged();
    partial void OnDateBazgashtChanging(string value);
    partial void OnDateBazgashtChanged();
    partial void OnPriceTotalChanging(string value);
    partial void OnPriceTotalChanged();
    #endregion
		
		public tblTahvil()
		{
			this._tblCustomer = default(EntityRef<tblCustomer>);
			this._tblMovie = default(EntityRef<tblMovie>);
			OnCreated();
		}
		
		[Column(Storage="_TahvilId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int TahvilId
		{
			get
			{
				return this._TahvilId;
			}
			set
			{
				if ((this._TahvilId != value))
				{
					this.OnTahvilIdChanging(value);
					this.SendPropertyChanging();
					this._TahvilId = value;
					this.SendPropertyChanged("TahvilId");
					this.OnTahvilIdChanged();
				}
			}
		}
		
		[Column(Storage="_DateTahvil", DbType="NVarChar(50)")]
		public string DateTahvil
		{
			get
			{
				return this._DateTahvil;
			}
			set
			{
				if ((this._DateTahvil != value))
				{
					this.OnDateTahvilChanging(value);
					this.SendPropertyChanging();
					this._DateTahvil = value;
					this.SendPropertyChanged("DateTahvil");
					this.OnDateTahvilChanged();
				}
			}
		}
		
		[Column(Storage="_FilmId", DbType="Int")]
		public System.Nullable<int> FilmId
		{
			get
			{
				return this._FilmId;
			}
			set
			{
				if ((this._FilmId != value))
				{
					if (this._tblMovie.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnFilmIdChanging(value);
					this.SendPropertyChanging();
					this._FilmId = value;
					this.SendPropertyChanged("FilmId");
					this.OnFilmIdChanged();
				}
			}
		}
		
		[Column(Storage="_tahvilgirandeId", DbType="Int")]
		public System.Nullable<int> tahvilgirandeId
		{
			get
			{
				return this._tahvilgirandeId;
			}
			set
			{
				if ((this._tahvilgirandeId != value))
				{
					if (this._tblCustomer.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OntahvilgirandeIdChanging(value);
					this.SendPropertyChanging();
					this._tahvilgirandeId = value;
					this.SendPropertyChanged("tahvilgirandeId");
					this.OntahvilgirandeIdChanged();
				}
			}
		}
		
		[Column(Storage="_DateBazgasht", DbType="NVarChar(50)")]
		public string DateBazgasht
		{
			get
			{
				return this._DateBazgasht;
			}
			set
			{
				if ((this._DateBazgasht != value))
				{
					this.OnDateBazgashtChanging(value);
					this.SendPropertyChanging();
					this._DateBazgasht = value;
					this.SendPropertyChanged("DateBazgasht");
					this.OnDateBazgashtChanged();
				}
			}
		}
		
		[Column(Storage="_PriceTotal", DbType="NVarChar(50)")]
		public string PriceTotal
		{
			get
			{
				return this._PriceTotal;
			}
			set
			{
				if ((this._PriceTotal != value))
				{
					this.OnPriceTotalChanging(value);
					this.SendPropertyChanging();
					this._PriceTotal = value;
					this.SendPropertyChanged("PriceTotal");
					this.OnPriceTotalChanged();
				}
			}
		}
		
		[Association(Name="tblCustomer_tblTahvil", Storage="_tblCustomer", ThisKey="tahvilgirandeId", OtherKey="customerId", IsForeignKey=true)]
		public tblCustomer tblCustomer
		{
			get
			{
				return this._tblCustomer.Entity;
			}
			set
			{
				tblCustomer previousValue = this._tblCustomer.Entity;
				if (((previousValue != value) 
							|| (this._tblCustomer.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblCustomer.Entity = null;
						previousValue.tblTahvils.Remove(this);
					}
					this._tblCustomer.Entity = value;
					if ((value != null))
					{
						value.tblTahvils.Add(this);
						this._tahvilgirandeId = value.customerId;
					}
					else
					{
						this._tahvilgirandeId = default(Nullable<int>);
					}
					this.SendPropertyChanged("tblCustomer");
				}
			}
		}
		
		[Association(Name="tblMovie_tblTahvil", Storage="_tblMovie", ThisKey="FilmId", OtherKey="FilmId", IsForeignKey=true)]
		public tblMovie tblMovie
		{
			get
			{
				return this._tblMovie.Entity;
			}
			set
			{
				tblMovie previousValue = this._tblMovie.Entity;
				if (((previousValue != value) 
							|| (this._tblMovie.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblMovie.Entity = null;
						previousValue.tblTahvils.Remove(this);
					}
					this._tblMovie.Entity = value;
					if ((value != null))
					{
						value.tblTahvils.Add(this);
						this._FilmId = value.FilmId;
					}
					else
					{
						this._FilmId = default(Nullable<int>);
					}
					this.SendPropertyChanged("tblMovie");
				}
			}
		}
		
		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));
			}
		}
	}
	
	[Table(Name="dbo.tblTypeProduct")]
	public partial class tblTypeProduct : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private string _Type;
		
		private int _TypeId;
		
		private EntitySet<tblMovie> _tblMovies;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnTypeChanging(string value);
    partial void OnTypeChanged();
    partial void OnTypeIdChanging(int value);
    partial void OnTypeIdChanged();
    #endregion
		
		public tblTypeProduct()
		{
			this._tblMovies = new EntitySet<tblMovie>(new Action<tblMovie>(this.attach_tblMovies), new Action<tblMovie>(this.detach_tblMovies));
			OnCreated();
		}
		
		[Column(Storage="_Type", DbType="NVarChar(50)")]
		public string Type
		{
			get
			{
				return this._Type;
			}
			set
			{
				if ((this._Type != value))
				{
					this.OnTypeChanging(value);
					this.SendPropertyChanging();
					this._Type = value;
					this.SendPropertyChanged("Type");
					this.OnTypeChanged();
				}
			}
		}
		
		[Column(Storage="_TypeId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int TypeId
		{
			get
			{
				return this._TypeId;
			}
			set
			{
				if ((this._TypeId != value))
				{
					this.OnTypeIdChanging(value);
					this.SendPropertyChanging();
					this._TypeId = value;
					this.SendPropertyChanged("TypeId");
					this.OnTypeIdChanged();
				}
			}
		}
		
		[Association(Name="tblTypeProduct_tblMovie", Storage="_tblMovies", ThisKey="TypeId", OtherKey="TypeProductId")]
		public EntitySet<tblMovie> tblMovies
		{
			get
			{
				return this._tblMovies;
			}
			set
			{
				this._tblMovies.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_tblMovies(tblMovie entity)
		{
			this.SendPropertyChanging();
			entity.tblTypeProduct = this;
		}
		
		private void detach_tblMovies(tblMovie entity)
		{
			this.SendPropertyChanging();
			entity.tblTypeProduct = null;
		}
	}
	
	[Table(Name="dbo.tblUsers")]
	public partial class tblUser : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _RowID;
		
		private string _UsrName;
		
		private string _PsWord;
		
		private int _UsrType;
		
		private EntityRef<tblUserType> _tblUserType;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnRowIDChanging(int value);
    partial void OnRowIDChanged();
    partial void OnUsrNameChanging(string value);
    partial void OnUsrNameChanged();
    partial void OnPsWordChanging(string value);
    partial void OnPsWordChanged();
    partial void OnUsrTypeChanging(int value);
    partial void OnUsrTypeChanged();
    #endregion
		
		public tblUser()
		{
			this._tblUserType = default(EntityRef<tblUserType>);
			OnCreated();
		}
		
		[Column(Storage="_RowID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int RowID
		{
			get
			{
				return this._RowID;
			}
			set
			{
				if ((this._RowID != value))
				{
					this.OnRowIDChanging(value);
					this.SendPropertyChanging();
					this._RowID = value;
					this.SendPropertyChanged("RowID");
					this.OnRowIDChanged();
				}
			}
		}
		
		[Column(Storage="_UsrName", DbType="NVarChar(150) NOT NULL", CanBeNull=false)]
		public string UsrName
		{
			get
			{
				return this._UsrName;
			}
			set
			{
				if ((this._UsrName != value))
				{
					this.OnUsrNameChanging(value);
					this.SendPropertyChanging();
					this._UsrName = value;
					this.SendPropertyChanged("UsrName");
					this.OnUsrNameChanged();
				}
			}
		}
		
		[Column(Storage="_PsWord", DbType="NVarChar(150) NOT NULL", CanBeNull=false)]
		public string PsWord
		{
			get
			{
				return this._PsWord;
			}
			set
			{
				if ((this._PsWord != value))
				{
					this.OnPsWordChanging(value);
					this.SendPropertyChanging();
					this._PsWord = value;
					this.SendPropertyChanged("PsWord");
					this.OnPsWordChanged();
				}
			}
		}
		
		[Column(Storage="_UsrType", DbType="Int NOT NULL")]
		public int UsrType
		{
			get
			{
				return this._UsrType;
			}
			set
			{
				if ((this._UsrType != value))
				{
					if (this._tblUserType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnUsrTypeChanging(value);
					this.SendPropertyChanging();
					this._UsrType = value;
					this.SendPropertyChanged("UsrType");
					this.OnUsrTypeChanged();
				}
			}
		}
		
		[Association(Name="tblUserType_tblUser", Storage="_tblUserType", ThisKey="UsrType", OtherKey="UserTypeID", IsForeignKey=true)]
		public tblUserType tblUserType
		{
			get
			{
				return this._tblUserType.Entity;
			}
			set
			{
				tblUserType previousValue = this._tblUserType.Entity;
				if (((previousValue != value) 
							|| (this._tblUserType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblUserType.Entity = null;
						previousValue.tblUsers.Remove(this);
					}
					this._tblUserType.Entity = value;
					if ((value != null))
					{
						value.tblUsers.Add(this);
						this._UsrType = value.UserTypeID;
					}
					else
					{
						this._UsrType = default(int);
					}
					this.SendPropertyChanged("tblUserType");
				}
			}
		}
		
		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));
			}
		}
	}
	
	[Table(Name="dbo.tblUserTypes")]
	public partial class tblUserType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _UserTypeID;
		
		private string _UserTypeDescr;
		
		private EntitySet<tblUser> _tblUsers;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnUserTypeIDChanging(int value);
    partial void OnUserTypeIDChanged();
    partial void OnUserTypeDescrChanging(string value);
    partial void OnUserTypeDescrChanged();
    #endregion
		
		public tblUserType()
		{
			this._tblUsers = new EntitySet<tblUser>(new Action<tblUser>(this.attach_tblUsers), new Action<tblUser>(this.detach_tblUsers));
			OnCreated();
		}
		
		[Column(Storage="_UserTypeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int UserTypeID
		{
			get
			{
				return this._UserTypeID;
			}
			set
			{
				if ((this._UserTypeID != value))
				{
					this.OnUserTypeIDChanging(value);
					this.SendPropertyChanging();
					this._UserTypeID = value;
					this.SendPropertyChanged("UserTypeID");
					this.OnUserTypeIDChanged();
				}
			}
		}
		
		[Column(Storage="_UserTypeDescr", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string UserTypeDescr
		{
			get
			{
				return this._UserTypeDescr;
			}
			set
			{
				if ((this._UserTypeDescr != value))
				{
					this.OnUserTypeDescrChanging(value);
					this.SendPropertyChanging();
					this._UserTypeDescr = value;
					this.SendPropertyChanged("UserTypeDescr");
					this.OnUserTypeDescrChanged();
				}
			}
		}
		
		[Association(Name="tblUserType_tblUser", Storage="_tblUsers", ThisKey="UserTypeID", OtherKey="UsrType")]
		public EntitySet<tblUser> tblUsers
		{
			get
			{
				return this._tblUsers;
			}
			set
			{
				this._tblUsers.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_tblUsers(tblUser entity)
		{
			this.SendPropertyChanging();
			entity.tblUserType = this;
		}
		
		private void detach_tblUsers(tblUser entity)
		{
			this.SendPropertyChanging();
			entity.tblUserType = null;
		}
	}
	
	[Table(Name="dbo.xtblDaramadFilm")]
	public partial class xtblDaramadFilm
	{
		
		private System.Nullable<int> _Expr1;
		
		private string _Title;
		
		public xtblDaramadFilm()
		{
		}
		
		[Column(Storage="_Expr1", DbType="Int")]
		public System.Nullable<int> Expr1
		{
			get
			{
				return this._Expr1;
			}
			set
			{
				if ((this._Expr1 != value))
				{
					this._Expr1 = value;
				}
			}
		}
		
		[Column(Storage="_Title", DbType="NVarChar(100)")]
		public string Title
		{
			get
			{
				return this._Title;
			}
			set
			{
				if ((this._Title != value))
				{
					this._Title = value;
				}
			}
		}
	}
	
	[Table(Name="dbo.xtblTedadFilmMoshtari")]
	public partial class xtblTedadFilmMoshtari
	{
		
		private string _Name;
		
		private string _SName;
		
		private System.Nullable<int> _TedadFilm;
		
		public xtblTedadFilmMoshtari()
		{
		}
		
		[Column(Storage="_Name", DbType="NVarChar(50)")]
		public string Name
		{
			get
			{
				return this._Name;
			}
			set
			{
				if ((this._Name != value))
				{
					this._Name = value;
				}
			}
		}
		
		[Column(Storage="_SName", DbType="NVarChar(50)")]
		public string SName
		{
			get
			{
				return this._SName;
			}
			set
			{
				if ((this._SName != value))
				{
					this._SName = value;
				}
			}
		}
		
		[Column(Storage="_TedadFilm", DbType="Int")]
		public System.Nullable<int> TedadFilm
		{
			get
			{
				return this._TedadFilm;
			}
			set
			{
				if ((this._TedadFilm != value))
				{
					this._TedadFilm = value;
				}
			}
		}
	}
	
	[Table(Name="dbo.xtblDaryaftGorohFilm")]
	public partial class xtblDaryaftGorohFilm
	{
		
		private string _TypeFilm;
		
		private System.Nullable<int> _TedadFilm;
		
		public xtblDaryaftGorohFilm()
		{
		}
		
		[Column(Storage="_TypeFilm", DbType="NVarChar(50)")]
		public string TypeFilm
		{
			get
			{
				return this._TypeFilm;
			}
			set
			{
				if ((this._TypeFilm != value))
				{
					this._TypeFilm = value;
				}
			}
		}
		
		[Column(Storage="_TedadFilm", DbType="Int")]
		public System.Nullable<int> TedadFilm
		{
			get
			{
				return this._TedadFilm;
			}
			set
			{
				if ((this._TedadFilm != value))
				{
					this._TedadFilm = value;
				}
			}
		}
	}
	
	[Table(Name="dbo.xtblMovie")]
	public partial class xtblMovie
	{
		
		private int _FilmId;
		
		private string _Title;
		
		private string _TypeFilm;
		
		private string _Type;
		
		private System.Nullable<int> _TypeFilmId;
		
		private System.Nullable<int> _TypeProductId;
		
		private string _Kargardan;
		
		private string _writer;
		
		private string _SaleTolid;
		
		private string _Time;
		
		public xtblMovie()
		{
		}
		
		[Column(Storage="_FilmId", DbType="Int NOT NULL")]
		public int FilmId
		{
			get
			{
				return this._FilmId;
			}
			set
			{
				if ((this._FilmId != value))
				{
					this._FilmId = value;
				}
			}
		}
		
		[Column(Storage="_Title", DbType="NVarChar(100)")]
		public string Title
		{
			get
			{
				return this._Title;
			}
			set
			{
				if ((this._Title != value))
				{
					this._Title = value;
				}
			}
		}
		
		[Column(Storage="_TypeFilm", DbType="NVarChar(50)")]
		public string TypeFilm
		{
			get
			{
				return this._TypeFilm;
			}
			set
			{
				if ((this._TypeFilm != value))
				{
					this._TypeFilm = value;
				}
			}
		}
		
		[Column(Storage="_Type", DbType="NVarChar(50)")]
		public string Type
		{
			get
			{
				return this._Type;
			}
			set
			{
				if ((this._Type != value))
				{
					this._Type = value;
				}
			}
		}
		
		[Column(Storage="_TypeFilmId", DbType="Int")]
		public System.Nullable<int> TypeFilmId
		{
			get
			{
				return this._TypeFilmId;
			}
			set
			{
				if ((this._TypeFilmId != value))
				{
					this._TypeFilmId = value;
				}
			}
		}
		
		[Column(Storage="_TypeProductId", DbType="Int")]
		public System.Nullable<int> TypeProductId
		{
			get
			{
				return this._TypeProductId;
			}
			set
			{
				if ((this._TypeProductId != value))
				{
					this._TypeProductId = value;
				}
			}
		}
		
		[Column(Storage="_Kargardan", DbType="NVarChar(100)")]
		public string Kargardan
		{
			get
			{
				return this._Kargardan;
			}
			set
			{
				if ((this._Kargardan != value))
				{
					this._Kargardan = value;
				}
			}
		}
		
		[Column(Storage="_writer", DbType="NVarChar(100)")]
		public string writer
		{
			get
			{
				return this._writer;
			}
			set
			{
				if ((this._writer != value))
				{
					this._writer = value;
				}
			}
		}
		
		[Column(Storage="_SaleTolid", DbType="NVarChar(50)")]
		public string SaleTolid
		{
			get
			{
				return this._SaleTolid;
			}
			set
			{
				if ((this._SaleTolid != value))
				{
					this._SaleTolid = value;
				}
			}
		}
		
		[Column(Storage="_Time", DbType="NVarChar(50)")]
		public string Time
		{
			get
			{
				return this._Time;
			}
			set
			{
				if ((this._Time != value))
				{
					this._Time = value;
				}
			}
		}
	}
	
	[Table(Name="dbo.xtblTahvil")]
	public partial class xtblTahvil
	{
		
		private int _TahvilId;
		
		private string _DateTahvil;
		
		private string _Title;
		
		private string _SName;
		
		private string _DateBazgasht;
		
		private string _PriceTotal;
		
		private System.Nullable<int> _FilmId;
		
		private System.Nullable<int> _tahvilgirandeId;
		
		public xtblTahvil()
		{
		}
		
		[Column(Storage="_TahvilId", DbType="Int NOT NULL")]
		public int TahvilId
		{
			get
			{
				return this._TahvilId;
			}
			set
			{
				if ((this._TahvilId != value))
				{
					this._TahvilId = value;
				}
			}
		}
		
		[Column(Storage="_DateTahvil", DbType="NVarChar(50)")]
		public string DateTahvil
		{
			get
			{
				return this._DateTahvil;
			}
			set
			{
				if ((this._DateTahvil != value))
				{
					this._DateTahvil = value;
				}
			}
		}
		
		[Column(Storage="_Title", DbType="NVarChar(100)")]
		public string Title
		{
			get
			{
				return this._Title;
			}
			set
			{
				if ((this._Title != value))
				{
					this._Title = value;
				}
			}
		}
		
		[Column(Storage="_SName", DbType="NVarChar(50)")]
		public string SName
		{
			get
			{
				return this._SName;
			}
			set
			{
				if ((this._SName != value))
				{
					this._SName = value;
				}
			}
		}
		
		[Column(Storage="_DateBazgasht", DbType="NVarChar(50)")]
		public string DateBazgasht
		{
			get
			{
				return this._DateBazgasht;
			}
			set
			{
				if ((this._DateBazgasht != value))
				{
					this._DateBazgasht = value;
				}
			}
		}
		
		[Column(Storage="_PriceTotal", DbType="NVarChar(50)")]
		public string PriceTotal
		{
			get
			{
				return this._PriceTotal;
			}
			set
			{
				if ((this._PriceTotal != value))
				{
					this._PriceTotal = value;
				}
			}
		}
		
		[Column(Storage="_FilmId", DbType="Int")]
		public System.Nullable<int> FilmId
		{
			get
			{
				return this._FilmId;
			}
			set
			{
				if ((this._FilmId != value))
				{
					this._FilmId = value;
				}
			}
		}
		
		[Column(Storage="_tahvilgirandeId", DbType="Int")]
		public System.Nullable<int> tahvilgirandeId
		{
			get
			{
				return this._tahvilgirandeId;
			}
			set
			{
				if ((this._tahvilgirandeId != value))
				{
					this._tahvilgirandeId = value;
				}
			}
		}
	}
	
	[Table(Name="dbo.tblMovie")]
	public partial class tblMovie : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _FilmId;
		
		private string _Title;
		
		private System.Nullable<int> _TypeFilmId;
		
		private System.Nullable<int> _TypeProductId;
		
		private string _Kargardan;
		
		private string _writer;
		
		private string _SaleTolid;
		
		private string _Time;
		
		private System.Nullable<bool> _AmanatBit;
		
		private EntitySet<tblTahvil> _tblTahvils;
		
		private EntityRef<tblTypeProduct> _tblTypeProduct;
		
		private EntityRef<TypeMovie> _TypeMovie;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnFilmIdChanging(int value);
    partial void OnFilmIdChanged();
    partial void OnTitleChanging(string value);
    partial void OnTitleChanged();
    partial void OnTypeFilmIdChanging(System.Nullable<int> value);
    partial void OnTypeFilmIdChanged();
    partial void OnTypeProductIdChanging(System.Nullable<int> value);
    partial void OnTypeProductIdChanged();
    partial void OnKargardanChanging(string value);
    partial void OnKargardanChanged();
    partial void OnwriterChanging(string value);
    partial void OnwriterChanged();
    partial void OnSaleTolidChanging(string value);
    partial void OnSaleTolidChanged();
    partial void OnTimeChanging(string value);
    partial void OnTimeChanged();
    partial void OnAmanatBitChanging(System.Nullable<bool> value);
    partial void OnAmanatBitChanged();
    #endregion
		
		public tblMovie()
		{
			this._tblTahvils = new EntitySet<tblTahvil>(new Action<tblTahvil>(this.attach_tblTahvils), new Action<tblTahvil>(this.detach_tblTahvils));
			this._tblTypeProduct = default(EntityRef<tblTypeProduct>);
			this._TypeMovie = default(EntityRef<TypeMovie>);
			OnCreated();
		}
		
		[Column(Storage="_FilmId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int FilmId
		{
			get
			{
				return this._FilmId;
			}
			set
			{
				if ((this._FilmId != value))
				{
					this.OnFilmIdChanging(value);
					this.SendPropertyChanging();
					this._FilmId = value;
					this.SendPropertyChanged("FilmId");
					this.OnFilmIdChanged();
				}
			}
		}
		
		[Column(Storage="_Title", DbType="NVarChar(100)")]
		public string Title
		{
			get
			{
				return this._Title;
			}
			set
			{
				if ((this._Title != value))
				{
					this.OnTitleChanging(value);
					this.SendPropertyChanging();
					this._Title = value;
					this.SendPropertyChanged("Title");
					this.OnTitleChanged();
				}
			}
		}
		
		[Column(Storage="_TypeFilmId", DbType="Int")]
		public System.Nullable<int> TypeFilmId
		{
			get
			{
				return this._TypeFilmId;
			}
			set
			{
				if ((this._TypeFilmId != value))
				{
					if (this._TypeMovie.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnTypeFilmIdChanging(value);
					this.SendPropertyChanging();
					this._TypeFilmId = value;
					this.SendPropertyChanged("TypeFilmId");
					this.OnTypeFilmIdChanged();
				}
			}
		}
		
		[Column(Storage="_TypeProductId", DbType="Int")]
		public System.Nullable<int> TypeProductId
		{
			get
			{
				return this._TypeProductId;
			}
			set
			{
				if ((this._TypeProductId != value))
				{
					if (this._tblTypeProduct.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnTypeProductIdChanging(value);
					this.SendPropertyChanging();
					this._TypeProductId = value;
					this.SendPropertyChanged("TypeProductId");
					this.OnTypeProductIdChanged();
				}
			}
		}
		
		[Column(Storage="_Kargardan", DbType="NVarChar(100)")]
		public string Kargardan
		{
			get
			{
				return this._Kargardan;
			}
			set
			{
				if ((this._Kargardan != value))
				{
					this.OnKargardanChanging(value);
					this.SendPropertyChanging();
					this._Kargardan = value;
					this.SendPropertyChanged("Kargardan");
					this.OnKargardanChanged();
				}
			}
		}
		
		[Column(Storage="_writer", DbType="NVarChar(100)")]
		public string writer
		{
			get
			{
				return this._writer;
			}
			set
			{
				if ((this._writer != value))
				{
					this.OnwriterChanging(value);
					this.SendPropertyChanging();
					this._writer = value;
					this.SendPropertyChanged("writer");
					this.OnwriterChanged();
				}
			}
		}
		
		[Column(Storage="_SaleTolid", DbType="NVarChar(50)")]
		public string SaleTolid
		{
			get
			{
				return this._SaleTolid;
			}
			set
			{
				if ((this._SaleTolid != value))
				{
					this.OnSaleTolidChanging(value);
					this.SendPropertyChanging();
					this._SaleTolid = value;
					this.SendPropertyChanged("SaleTolid");
					this.OnSaleTolidChanged();
				}
			}
		}
		
		[Column(Storage="_Time", DbType="NVarChar(50)")]
		public string Time
		{
			get
			{
				return this._Time;
			}
			set
			{
				if ((this._Time != value))
				{
					this.OnTimeChanging(value);
					this.SendPropertyChanging();
					this._Time = value;
					this.SendPropertyChanged("Time");
					this.OnTimeChanged();
				}
			}
		}
		
		[Column(Storage="_AmanatBit", DbType="Bit")]
		public System.Nullable<bool> AmanatBit
		{
			get
			{
				return this._AmanatBit;
			}
			set
			{
				if ((this._AmanatBit != value))
				{
					this.OnAmanatBitChanging(value);
					this.SendPropertyChanging();
					this._AmanatBit = value;
					this.SendPropertyChanged("AmanatBit");
					this.OnAmanatBitChanged();
				}
			}
		}
		
		[Association(Name="tblMovie_tblTahvil", Storage="_tblTahvils", ThisKey="FilmId", OtherKey="FilmId")]
		public EntitySet<tblTahvil> tblTahvils
		{
			get
			{
				return this._tblTahvils;
			}
			set
			{
				this._tblTahvils.Assign(value);
			}
		}
		
		[Association(Name="tblTypeProduct_tblMovie", Storage="_tblTypeProduct", ThisKey="TypeProductId", OtherKey="TypeId", IsForeignKey=true)]
		public tblTypeProduct tblTypeProduct
		{
			get
			{
				return this._tblTypeProduct.Entity;
			}
			set
			{
				tblTypeProduct previousValue = this._tblTypeProduct.Entity;
				if (((previousValue != value) 
							|| (this._tblTypeProduct.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblTypeProduct.Entity = null;
						previousValue.tblMovies.Remove(this);
					}
					this._tblTypeProduct.Entity = value;
					if ((value != null))
					{
						value.tblMovies.Add(this);
						this._TypeProductId = value.TypeId;
					}
					else
					{
						this._TypeProductId = default(Nullable<int>);
					}
					this.SendPropertyChanged("tblTypeProduct");
				}
			}
		}
		
		[Association(Name="TypeMovie_tblMovie", Storage="_TypeMovie", ThisKey="TypeFilmId", OtherKey="TypeId", IsForeignKey=true)]
		public TypeMovie TypeMovie
		{
			get
			{
				return this._TypeMovie.Entity;
			}
			set
			{
				TypeMovie previousValue = this._TypeMovie.Entity;
				if (((previousValue != value) 
							|| (this._TypeMovie.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._TypeMovie.Entity = null;
						previousValue.tblMovies.Remove(this);
					}
					this._TypeMovie.Entity = value;
					if ((value != null))
					{
						value.tblMovies.Add(this);
						this._TypeFilmId = value.TypeId;
					}
					else
					{
						this._TypeFilmId = default(Nullable<int>);
					}
					this.SendPropertyChanged("TypeMovie");
				}
			}
		}
		
		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_tblTahvils(tblTahvil entity)
		{
			this.SendPropertyChanging();
			entity.tblMovie = this;
		}
		
		private void detach_tblTahvils(tblTahvil entity)
		{
			this.SendPropertyChanging();
			entity.tblMovie = null;
		}
	}
}
#pragma warning restore 1591
