#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>
//------------------------------------------------------------------------------

namespace Volere_Manager
{
	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="blank")]
	public partial class Blank : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InsertConflicts(Conflicts instance);
    partial void UpdateConflicts(Conflicts instance);
    partial void DeleteConflicts(Conflicts instance);
    partial void InsertReq(Req instance);
    partial void UpdateReq(Req instance);
    partial void DeleteReq(Req instance);
    partial void InsertReq_Resources(Req_Resources instance);
    partial void UpdateReq_Resources(Req_Resources instance);
    partial void DeleteReq_Resources(Req_Resources instance);
    partial void InsertReq_Types(Req_Types instance);
    partial void UpdateReq_Types(Req_Types instance);
    partial void DeleteReq_Types(Req_Types instance);
    partial void InsertResources(Resources instance);
    partial void UpdateResources(Resources instance);
    partial void DeleteResources(Resources instance);
    #endregion
		
		public Blank(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public Blank(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public Blank(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public Blank(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<Conflicts> Conflicts
		{
			get
			{
				return this.GetTable<Conflicts>();
			}
		}
		
		public System.Data.Linq.Table<Req> Req
		{
			get
			{
				return this.GetTable<Req>();
			}
		}
		
		public System.Data.Linq.Table<Req_Resources> Req_Resources
		{
			get
			{
				return this.GetTable<Req_Resources>();
			}
		}
		
		public System.Data.Linq.Table<Req_Types> Req_Types
		{
			get
			{
				return this.GetTable<Req_Types>();
			}
		}
		
		public System.Data.Linq.Table<Resources> Resources
		{
			get
			{
				return this.GetTable<Resources>();
			}
		}
	}
	
	[Table()]
	public partial class Conflicts : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private long _Id;
		
		private long _Req_id1;
		
		private long _Req_id2;
		
		private EntityRef<Req> _Req;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnIdChanging(long value);
    partial void OnIdChanged();
    partial void OnReq_id1Changing(long value);
    partial void OnReq_id1Changed();
    partial void OnReq_id2Changing(long value);
    partial void OnReq_id2Changed();
    #endregion
		
		public Conflicts()
		{
			this._Req = default(EntityRef<Req>);
			OnCreated();
		}
		
		[Column(Name="id", Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public long Id
		{
			get
			{
				return this._Id;
			}
			set
			{
				if ((this._Id != value))
				{
					this.OnIdChanging(value);
					this.SendPropertyChanging();
					this._Id = value;
					this.SendPropertyChanged("Id");
					this.OnIdChanged();
				}
			}
		}
		
		[Column(Name="req_id1", Storage="_Req_id1", DbType="BigInt NOT NULL")]
		public long Req_id1
		{
			get
			{
				return this._Req_id1;
			}
			set
			{
				if ((this._Req_id1 != value))
				{
					this.OnReq_id1Changing(value);
					this.SendPropertyChanging();
					this._Req_id1 = value;
					this.SendPropertyChanged("Req_id1");
					this.OnReq_id1Changed();
				}
			}
		}
		
		[Column(Name="req_id2", Storage="_Req_id2", DbType="BigInt NOT NULL")]
		public long Req_id2
		{
			get
			{
				return this._Req_id2;
			}
			set
			{
				if ((this._Req_id2 != value))
				{
					this.OnReq_id2Changing(value);
					this.SendPropertyChanging();
					this._Req_id2 = value;
					this.SendPropertyChanged("Req_id2");
					this.OnReq_id2Changed();
				}
			}
		}
		
		[Association(Name="Req_Conflicts", Storage="_Req", ThisKey="Req_id1", OtherKey="Id", IsForeignKey=true, DeleteOnNull=true)]
		public Req Req
		{
			get
			{
				return this._Req.Entity;
			}
			set
			{
				Req previousValue = this._Req.Entity;
				if (((previousValue != value) 
							|| (this._Req.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Req.Entity = null;
						previousValue.Conflicts.Remove(this);
					}
					this._Req.Entity = value;
					if ((value != null))
					{
						value.Conflicts.Add(this);
						this._Req_id1 = value.Id;
					}
					else
					{
						this._Req_id1 = default(long);
					}
					this.SendPropertyChanged("Req");
				}
			}
		}
		
		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()]
	public partial class Req : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private long _Id;
		
		private long _Type_id;
		
		private string _Description;
		
		private string _Rationale;
		
		private string _Originator_id;
		
		private string _Fit_criterion;
		
		private System.Nullable<byte> _Satisfaction;
		
		private System.Nullable<byte> _Dissatisfaction;
		
		private System.Nullable<byte> _Priority;
		
		private System.Nullable<System.DateTime> _Created;
		
		private System.Nullable<System.DateTime> _Modified;
		
		private string _Use_cases;
		
		private EntitySet<Conflicts> _Conflicts;
		
		private EntitySet<Req_Resources> _Req_Resources;
		
		private EntityRef<Req_Types> _Req_Types;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnIdChanging(long value);
    partial void OnIdChanged();
    partial void OnType_idChanging(long value);
    partial void OnType_idChanged();
    partial void OnDescriptionChanging(string value);
    partial void OnDescriptionChanged();
    partial void OnRationaleChanging(string value);
    partial void OnRationaleChanged();
    partial void OnOriginator_idChanging(string value);
    partial void OnOriginator_idChanged();
    partial void OnFit_criterionChanging(string value);
    partial void OnFit_criterionChanged();
    partial void OnSatisfactionChanging(System.Nullable<byte> value);
    partial void OnSatisfactionChanged();
    partial void OnDissatisfactionChanging(System.Nullable<byte> value);
    partial void OnDissatisfactionChanged();
    partial void OnPriorityChanging(System.Nullable<byte> value);
    partial void OnPriorityChanged();
    partial void OnCreatedChanging(System.Nullable<System.DateTime> value);
    partial void OnCreatedChanged();
    partial void OnModifiedChanging(System.Nullable<System.DateTime> value);
    partial void OnModifiedChanged();
    partial void OnUse_casesChanging(string value);
    partial void OnUse_casesChanged();
    #endregion
		
		public Req()
		{
			this._Conflicts = new EntitySet<Conflicts>(new Action<Conflicts>(this.attach_Conflicts), new Action<Conflicts>(this.detach_Conflicts));
			this._Req_Resources = new EntitySet<Req_Resources>(new Action<Req_Resources>(this.attach_Req_Resources), new Action<Req_Resources>(this.detach_Req_Resources));
			this._Req_Types = default(EntityRef<Req_Types>);
			OnCreated();
		}
		
		[Column(Name="id", Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public long Id
		{
			get
			{
				return this._Id;
			}
			set
			{
				if ((this._Id != value))
				{
					this.OnIdChanging(value);
					this.SendPropertyChanging();
					this._Id = value;
					this.SendPropertyChanged("Id");
					this.OnIdChanged();
				}
			}
		}
		
		[Column(Name="type_id", Storage="_Type_id", DbType="BigInt NOT NULL")]
		public long Type_id
		{
			get
			{
				return this._Type_id;
			}
			set
			{
				if ((this._Type_id != value))
				{
					this.OnType_idChanging(value);
					this.SendPropertyChanging();
					this._Type_id = value;
					this.SendPropertyChanged("Type_id");
					this.OnType_idChanged();
				}
			}
		}
		
		[Column(Name="description", Storage="_Description", DbType="NVarChar(4000)")]
		public string Description
		{
			get
			{
				return this._Description;
			}
			set
			{
				if ((this._Description != value))
				{
					this.OnDescriptionChanging(value);
					this.SendPropertyChanging();
					this._Description = value;
					this.SendPropertyChanged("Description");
					this.OnDescriptionChanged();
				}
			}
		}
		
		[Column(Name="rationale", Storage="_Rationale", DbType="NVarChar(4000)")]
		public string Rationale
		{
			get
			{
				return this._Rationale;
			}
			set
			{
				if ((this._Rationale != value))
				{
					this.OnRationaleChanging(value);
					this.SendPropertyChanging();
					this._Rationale = value;
					this.SendPropertyChanged("Rationale");
					this.OnRationaleChanged();
				}
			}
		}
		
		[Column(Name="originator_id", Storage="_Originator_id", DbType="NVarChar(400)")]
		public string Originator_id
		{
			get
			{
				return this._Originator_id;
			}
			set
			{
				if ((this._Originator_id != value))
				{
					this.OnOriginator_idChanging(value);
					this.SendPropertyChanging();
					this._Originator_id = value;
					this.SendPropertyChanged("Originator_id");
					this.OnOriginator_idChanged();
				}
			}
		}
		
		[Column(Name="fit_criterion", Storage="_Fit_criterion", DbType="NVarChar(4000)")]
		public string Fit_criterion
		{
			get
			{
				return this._Fit_criterion;
			}
			set
			{
				if ((this._Fit_criterion != value))
				{
					this.OnFit_criterionChanging(value);
					this.SendPropertyChanging();
					this._Fit_criterion = value;
					this.SendPropertyChanged("Fit_criterion");
					this.OnFit_criterionChanged();
				}
			}
		}
		
		[Column(Name="satisfaction", Storage="_Satisfaction", DbType="TinyInt")]
		public System.Nullable<byte> Satisfaction
		{
			get
			{
				return this._Satisfaction;
			}
			set
			{
				if ((this._Satisfaction != value))
				{
					this.OnSatisfactionChanging(value);
					this.SendPropertyChanging();
					this._Satisfaction = value;
					this.SendPropertyChanged("Satisfaction");
					this.OnSatisfactionChanged();
				}
			}
		}
		
		[Column(Name="dissatisfaction", Storage="_Dissatisfaction", DbType="TinyInt")]
		public System.Nullable<byte> Dissatisfaction
		{
			get
			{
				return this._Dissatisfaction;
			}
			set
			{
				if ((this._Dissatisfaction != value))
				{
					this.OnDissatisfactionChanging(value);
					this.SendPropertyChanging();
					this._Dissatisfaction = value;
					this.SendPropertyChanged("Dissatisfaction");
					this.OnDissatisfactionChanged();
				}
			}
		}
		
		[Column(Name="priority", Storage="_Priority", DbType="TinyInt")]
		public System.Nullable<byte> Priority
		{
			get
			{
				return this._Priority;
			}
			set
			{
				if ((this._Priority != value))
				{
					this.OnPriorityChanging(value);
					this.SendPropertyChanging();
					this._Priority = value;
					this.SendPropertyChanged("Priority");
					this.OnPriorityChanged();
				}
			}
		}
		
		[Column(Name="created", Storage="_Created", DbType="DateTime")]
		public System.Nullable<System.DateTime> Created
		{
			get
			{
				return this._Created;
			}
			set
			{
				if ((this._Created != value))
				{
					this.OnCreatedChanging(value);
					this.SendPropertyChanging();
					this._Created = value;
					this.SendPropertyChanged("Created");
					this.OnCreatedChanged();
				}
			}
		}
		
		[Column(Name="modified", Storage="_Modified", DbType="DateTime")]
		public System.Nullable<System.DateTime> Modified
		{
			get
			{
				return this._Modified;
			}
			set
			{
				if ((this._Modified != value))
				{
					this.OnModifiedChanging(value);
					this.SendPropertyChanging();
					this._Modified = value;
					this.SendPropertyChanged("Modified");
					this.OnModifiedChanged();
				}
			}
		}
		
		[Column(Name="use_cases", Storage="_Use_cases", DbType="NVarChar(200)")]
		public string Use_cases
		{
			get
			{
				return this._Use_cases;
			}
			set
			{
				if ((this._Use_cases != value))
				{
					this.OnUse_casesChanging(value);
					this.SendPropertyChanging();
					this._Use_cases = value;
					this.SendPropertyChanged("Use_cases");
					this.OnUse_casesChanged();
				}
			}
		}
		
		[Association(Name="Req_Conflicts", Storage="_Conflicts", ThisKey="Id", OtherKey="Req_id1")]
		public EntitySet<Conflicts> Conflicts
		{
			get
			{
				return this._Conflicts;
			}
			set
			{
				this._Conflicts.Assign(value);
			}
		}
		
		[Association(Name="Req_Req_Resources", Storage="_Req_Resources", ThisKey="Id", OtherKey="Req_id")]
		public EntitySet<Req_Resources> Req_Resources
		{
			get
			{
				return this._Req_Resources;
			}
			set
			{
				this._Req_Resources.Assign(value);
			}
		}
		
		[Association(Name="Req_Types_Req", Storage="_Req_Types", ThisKey="Type_id", OtherKey="Id", IsForeignKey=true, DeleteOnNull=true)]
		public Req_Types Req_Types
		{
			get
			{
				return this._Req_Types.Entity;
			}
			set
			{
				Req_Types previousValue = this._Req_Types.Entity;
				if (((previousValue != value) 
							|| (this._Req_Types.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Req_Types.Entity = null;
						previousValue.Req.Remove(this);
					}
					this._Req_Types.Entity = value;
					if ((value != null))
					{
						value.Req.Add(this);
						this._Type_id = value.Id;
					}
					else
					{
						this._Type_id = default(long);
					}
					this.SendPropertyChanged("Req_Types");
				}
			}
		}
		
		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_Conflicts(Conflicts entity)
		{
			this.SendPropertyChanging();
			entity.Req = this;
		}
		
		private void detach_Conflicts(Conflicts entity)
		{
			this.SendPropertyChanging();
			entity.Req = null;
		}
		
		private void attach_Req_Resources(Req_Resources entity)
		{
			this.SendPropertyChanging();
			entity.Req = this;
		}
		
		private void detach_Req_Resources(Req_Resources entity)
		{
			this.SendPropertyChanging();
			entity.Req = null;
		}
	}
	
	[Table()]
	public partial class Req_Resources : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private long _Req_id;
		
		private int _Resources_id;
		
		private long _Id;
		
		private EntityRef<Req> _Req;
		
		private EntityRef<Resources> _Resources;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnReq_idChanging(long value);
    partial void OnReq_idChanged();
    partial void OnResources_idChanging(int value);
    partial void OnResources_idChanged();
    partial void OnIdChanging(long value);
    partial void OnIdChanged();
    #endregion
		
		public Req_Resources()
		{
			this._Req = default(EntityRef<Req>);
			this._Resources = default(EntityRef<Resources>);
			OnCreated();
		}
		
		[Column(Name="req_id", Storage="_Req_id", DbType="BigInt NOT NULL")]
		public long Req_id
		{
			get
			{
				return this._Req_id;
			}
			set
			{
				if ((this._Req_id != value))
				{
					this.OnReq_idChanging(value);
					this.SendPropertyChanging();
					this._Req_id = value;
					this.SendPropertyChanged("Req_id");
					this.OnReq_idChanged();
				}
			}
		}
		
		[Column(Name="resources_id", Storage="_Resources_id", DbType="Int NOT NULL")]
		public int Resources_id
		{
			get
			{
				return this._Resources_id;
			}
			set
			{
				if ((this._Resources_id != value))
				{
					this.OnResources_idChanging(value);
					this.SendPropertyChanging();
					this._Resources_id = value;
					this.SendPropertyChanged("Resources_id");
					this.OnResources_idChanged();
				}
			}
		}
		
		[Column(Name="id", Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public long Id
		{
			get
			{
				return this._Id;
			}
			set
			{
				if ((this._Id != value))
				{
					this.OnIdChanging(value);
					this.SendPropertyChanging();
					this._Id = value;
					this.SendPropertyChanged("Id");
					this.OnIdChanged();
				}
			}
		}
		
		[Association(Name="Req_Req_Resources", Storage="_Req", ThisKey="Req_id", OtherKey="Id", IsForeignKey=true, DeleteOnNull=true)]
		public Req Req
		{
			get
			{
				return this._Req.Entity;
			}
			set
			{
				Req previousValue = this._Req.Entity;
				if (((previousValue != value) 
							|| (this._Req.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Req.Entity = null;
						previousValue.Req_Resources.Remove(this);
					}
					this._Req.Entity = value;
					if ((value != null))
					{
						value.Req_Resources.Add(this);
						this._Req_id = value.Id;
					}
					else
					{
						this._Req_id = default(long);
					}
					this.SendPropertyChanged("Req");
				}
			}
		}
		
		[Association(Name="Resources_Req_Resources", Storage="_Resources", ThisKey="Resources_id", OtherKey="Id", IsForeignKey=true, DeleteOnNull=true)]
		public Resources Resources
		{
			get
			{
				return this._Resources.Entity;
			}
			set
			{
				Resources previousValue = this._Resources.Entity;
				if (((previousValue != value) 
							|| (this._Resources.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Resources.Entity = null;
						previousValue.Req_Resources.Remove(this);
					}
					this._Resources.Entity = value;
					if ((value != null))
					{
						value.Req_Resources.Add(this);
						this._Resources_id = value.Id;
					}
					else
					{
						this._Resources_id = default(int);
					}
					this.SendPropertyChanged("Resources");
				}
			}
		}
		
		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()]
	public partial class Req_Types : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private long _Id;
		
		private int _Nr;
		
		private int _SubNr;
		
		private string _Name;
		
		private string _Contents;
		
		private System.Nullable<bool> _Used;
		
		private EntitySet<Req> _Req;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnIdChanging(long value);
    partial void OnIdChanged();
    partial void OnNrChanging(int value);
    partial void OnNrChanged();
    partial void OnSubNrChanging(int value);
    partial void OnSubNrChanged();
    partial void OnNameChanging(string value);
    partial void OnNameChanged();
    partial void OnContentsChanging(string value);
    partial void OnContentsChanged();
    partial void OnUsedChanging(System.Nullable<bool> value);
    partial void OnUsedChanged();
    #endregion
		
		public Req_Types()
		{
			this._Req = new EntitySet<Req>(new Action<Req>(this.attach_Req), new Action<Req>(this.detach_Req));
			OnCreated();
		}

        public override String ToString()
        {
            return this._Nr + "." + this._SubNr + "." + this._Name;
        }


		[Column(Name="id", Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public long Id
		{
			get
			{
				return this._Id;
			}
			set
			{
				if ((this._Id != value))
				{
					this.OnIdChanging(value);
					this.SendPropertyChanging();
					this._Id = value;
					this.SendPropertyChanged("Id");
					this.OnIdChanged();
				}
			}
		}
		
		[Column(Name="nr", Storage="_Nr", DbType="Int NOT NULL")]
		public int Nr
		{
			get
			{
				return this._Nr;
			}
			set
			{
				if ((this._Nr != value))
				{
					this.OnNrChanging(value);
					this.SendPropertyChanging();
					this._Nr = value;
					this.SendPropertyChanged("Nr");
					this.OnNrChanged();
				}
			}
		}
		
		[Column(Name="subNr", Storage="_SubNr", DbType="Int NOT NULL")]
		public int SubNr
		{
			get
			{
				return this._SubNr;
			}
			set
			{
				if ((this._SubNr != value))
				{
					this.OnSubNrChanging(value);
					this.SendPropertyChanging();
					this._SubNr = value;
					this.SendPropertyChanged("SubNr");
					this.OnSubNrChanged();
				}
			}
		}
		
		[Column(Name="name", Storage="_Name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		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(Name="contents", Storage="_Contents", DbType="NText NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
		public string Contents
		{
			get
			{
				return this._Contents;
			}
			set
			{
				if ((this._Contents != value))
				{
					this.OnContentsChanging(value);
					this.SendPropertyChanging();
					this._Contents = value;
					this.SendPropertyChanged("Contents");
					this.OnContentsChanged();
				}
			}
		}
		
		[Column(Name="used", Storage="_Used", DbType="Bit")]
		public System.Nullable<bool> Used
		{
			get
			{
				return this._Used;
			}
			set
			{
				if ((this._Used != value))
				{
					this.OnUsedChanging(value);
					this.SendPropertyChanging();
					this._Used = value;
					this.SendPropertyChanged("Used");
					this.OnUsedChanged();
				}
			}
		}
		
		[Association(Name="Req_Types_Req", Storage="_Req", ThisKey="Id", OtherKey="Type_id")]
		public EntitySet<Req> Req
		{
			get
			{
				return this._Req;
			}
			set
			{
				this._Req.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_Req(Req entity)
		{
			this.SendPropertyChanging();
			entity.Req_Types = this;
		}
		
		private void detach_Req(Req entity)
		{
			this.SendPropertyChanging();
			entity.Req_Types = null;
		}
	}
	
	[Table()]
	public partial class Resources : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _Id;
		
		private string _Description;
		
		private EntitySet<Req_Resources> _Req_Resources;
		
    #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 OnDescriptionChanging(string value);
    partial void OnDescriptionChanged();
    #endregion
		
		public Resources()
		{
			this._Req_Resources = new EntitySet<Req_Resources>(new Action<Req_Resources>(this.attach_Req_Resources), new Action<Req_Resources>(this.detach_Req_Resources));
			OnCreated();
		}
		
		[Column(Name="id", 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.OnIdChanging(value);
					this.SendPropertyChanging();
					this._Id = value;
					this.SendPropertyChanged("Id");
					this.OnIdChanged();
				}
			}
		}
		
		[Column(Name="description", Storage="_Description", DbType="NVarChar(200)")]
		public string Description
		{
			get
			{
				return this._Description;
			}
			set
			{
				if ((this._Description != value))
				{
					this.OnDescriptionChanging(value);
					this.SendPropertyChanging();
					this._Description = value;
					this.SendPropertyChanged("Description");
					this.OnDescriptionChanged();
				}
			}
		}
		
		[Association(Name="Resources_Req_Resources", Storage="_Req_Resources", ThisKey="Id", OtherKey="Resources_id")]
		public EntitySet<Req_Resources> Req_Resources
		{
			get
			{
				return this._Req_Resources;
			}
			set
			{
				this._Req_Resources.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_Req_Resources(Req_Resources entity)
		{
			this.SendPropertyChanging();
			entity.Resources = this;
		}
		
		private void detach_Req_Resources(Req_Resources entity)
		{
			this.SendPropertyChanging();
			entity.Resources = null;
		}
	}
}
#pragma warning restore 1591
