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

namespace AUDIOTEKA
{
	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="ASPNETDB")]
	public partial class DataClassesDataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InsertGenre(Genre instance);
    partial void UpdateGenre(Genre instance);
    partial void DeleteGenre(Genre instance);
    partial void InsertPersonalAlbum(PersonalAlbum instance);
    partial void UpdatePersonalAlbum(PersonalAlbum instance);
    partial void DeletePersonalAlbum(PersonalAlbum instance);
    partial void InsertArtist(Artist instance);
    partial void UpdateArtist(Artist instance);
    partial void DeleteArtist(Artist instance);
    partial void InsertAlbum(Album instance);
    partial void UpdateAlbum(Album instance);
    partial void DeleteAlbum(Album instance);
    #endregion
		
		public DataClassesDataContext() : 
				base(global::System.Configuration.ConfigurationManager.ConnectionStrings["ASPNETDBConnectionString"].ConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public DataClassesDataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public DataClassesDataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public DataClassesDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public DataClassesDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<Genre> Genres
		{
			get
			{
				return this.GetTable<Genre>();
			}
		}
		
		public System.Data.Linq.Table<PersonalAlbum> PersonalAlbums
		{
			get
			{
				return this.GetTable<PersonalAlbum>();
			}
		}
		
		public System.Data.Linq.Table<Artist> Artists
		{
			get
			{
				return this.GetTable<Artist>();
			}
		}
		
		public System.Data.Linq.Table<Album> Albums
		{
			get
			{
				return this.GetTable<Album>();
			}
		}
	}
	
	[Table(Name="dbo.Genres")]
	public partial class Genre : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _GenreId;
		
		private string _GenreName;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnGenreIdChanging(int value);
    partial void OnGenreIdChanged();
    partial void OnGenreNameChanging(string value);
    partial void OnGenreNameChanged();
    #endregion
		
		public Genre()
		{
			OnCreated();
		}
		
		[Column(Storage="_GenreId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int GenreId
		{
			get
			{
				return this._GenreId;
			}
			set
			{
				if ((this._GenreId != value))
				{
					this.OnGenreIdChanging(value);
					this.SendPropertyChanging();
					this._GenreId = value;
					this.SendPropertyChanged("GenreId");
					this.OnGenreIdChanged();
				}
			}
		}
		
		[Column(Storage="_GenreName", DbType="NVarChar(50)")]
		public string GenreName
		{
			get
			{
				return this._GenreName;
			}
			set
			{
				if ((this._GenreName != value))
				{
					this.OnGenreNameChanging(value);
					this.SendPropertyChanging();
					this._GenreName = value;
					this.SendPropertyChanged("GenreName");
					this.OnGenreNameChanged();
				}
			}
		}
		
		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.PersonalAlbums")]
	public partial class PersonalAlbum : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _AlbumId;
		
		private System.Guid _UserId;
		
		private string _Quality;
		
		private string _Rating;
		
		private string _StorageMedium;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnAlbumIdChanging(int value);
    partial void OnAlbumIdChanged();
    partial void OnUserIdChanging(System.Guid value);
    partial void OnUserIdChanged();
    partial void OnQualityChanging(string value);
    partial void OnQualityChanged();
    partial void OnRatingChanging(string value);
    partial void OnRatingChanged();
    partial void OnStorageMediumChanging(string value);
    partial void OnStorageMediumChanged();
    #endregion
		
		public PersonalAlbum()
		{
			OnCreated();
		}
		
		[Column(Storage="_AlbumId", DbType="Int NOT NULL", IsPrimaryKey=true)]
		public int AlbumId
		{
			get
			{
				return this._AlbumId;
			}
			set
			{
				if ((this._AlbumId != value))
				{
					this.OnAlbumIdChanging(value);
					this.SendPropertyChanging();
					this._AlbumId = value;
					this.SendPropertyChanged("AlbumId");
					this.OnAlbumIdChanged();
				}
			}
		}
		
		[Column(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")]
		public System.Guid UserId
		{
			get
			{
				return this._UserId;
			}
			set
			{
				if ((this._UserId != value))
				{
					this.OnUserIdChanging(value);
					this.SendPropertyChanging();
					this._UserId = value;
					this.SendPropertyChanged("UserId");
					this.OnUserIdChanged();
				}
			}
		}
		
		[Column(Storage="_Quality", DbType="NVarChar(25)")]
		public string Quality
		{
			get
			{
				return this._Quality;
			}
			set
			{
				if ((this._Quality != value))
				{
					this.OnQualityChanging(value);
					this.SendPropertyChanging();
					this._Quality = value;
					this.SendPropertyChanged("Quality");
					this.OnQualityChanged();
				}
			}
		}
		
		[Column(Storage="_Rating", DbType="NChar(10)")]
		public string Rating
		{
			get
			{
				return this._Rating;
			}
			set
			{
				if ((this._Rating != value))
				{
					this.OnRatingChanging(value);
					this.SendPropertyChanging();
					this._Rating = value;
					this.SendPropertyChanged("Rating");
					this.OnRatingChanged();
				}
			}
		}
		
		[Column(Storage="_StorageMedium", DbType="NVarChar(100)")]
		public string StorageMedium
		{
			get
			{
				return this._StorageMedium;
			}
			set
			{
				if ((this._StorageMedium != value))
				{
					this.OnStorageMediumChanging(value);
					this.SendPropertyChanging();
					this._StorageMedium = value;
					this.SendPropertyChanged("StorageMedium");
					this.OnStorageMediumChanged();
				}
			}
		}
		
		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.Artists")]
	public partial class Artist : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _ArtistId;
		
		private string _FirstName;
		
		private string _LastName;
		
		private string _Info;
		
		private string _HomePage;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnArtistIdChanging(int value);
    partial void OnArtistIdChanged();
    partial void OnFirstNameChanging(string value);
    partial void OnFirstNameChanged();
    partial void OnLastNameChanging(string value);
    partial void OnLastNameChanged();
    partial void OnInfoChanging(string value);
    partial void OnInfoChanged();
    partial void OnHomePageChanging(string value);
    partial void OnHomePageChanged();
    #endregion
		
		public Artist()
		{
			OnCreated();
		}
		
		[Column(Storage="_ArtistId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int ArtistId
		{
			get
			{
				return this._ArtistId;
			}
			set
			{
				if ((this._ArtistId != value))
				{
					this.OnArtistIdChanging(value);
					this.SendPropertyChanging();
					this._ArtistId = value;
					this.SendPropertyChanged("ArtistId");
					this.OnArtistIdChanged();
				}
			}
		}
		
		[Column(Storage="_FirstName", DbType="NVarChar(256) NOT NULL", CanBeNull=false)]
		public string FirstName
		{
			get
			{
				return this._FirstName;
			}
			set
			{
				if ((this._FirstName != value))
				{
					this.OnFirstNameChanging(value);
					this.SendPropertyChanging();
					this._FirstName = value;
					this.SendPropertyChanged("FirstName");
					this.OnFirstNameChanged();
				}
			}
		}
		
		[Column(Storage="_LastName", DbType="NVarChar(256)")]
		public string LastName
		{
			get
			{
				return this._LastName;
			}
			set
			{
				if ((this._LastName != value))
				{
					this.OnLastNameChanging(value);
					this.SendPropertyChanging();
					this._LastName = value;
					this.SendPropertyChanged("LastName");
					this.OnLastNameChanged();
				}
			}
		}
		
		[Column(Storage="_Info", DbType="NText", UpdateCheck=UpdateCheck.Never)]
		public string Info
		{
			get
			{
				return this._Info;
			}
			set
			{
				if ((this._Info != value))
				{
					this.OnInfoChanging(value);
					this.SendPropertyChanging();
					this._Info = value;
					this.SendPropertyChanged("Info");
					this.OnInfoChanged();
				}
			}
		}
		
		[Column(Storage="_HomePage", DbType="VarChar(256)")]
		public string HomePage
		{
			get
			{
				return this._HomePage;
			}
			set
			{
				if ((this._HomePage != value))
				{
					this.OnHomePageChanging(value);
					this.SendPropertyChanging();
					this._HomePage = value;
					this.SendPropertyChanged("HomePage");
					this.OnHomePageChanged();
				}
			}
		}
		
		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.Albums")]
	public partial class Album : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _AlbumId;
		
		private System.Nullable<int> _ArtistId;
		
		private System.Nullable<int> _GenreId;
		
		private string _AlbumName;
		
		private System.Nullable<int> _Year;
		
		private System.Nullable<bool> _PicturePresent;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnAlbumIdChanging(int value);
    partial void OnAlbumIdChanged();
    partial void OnArtistIdChanging(System.Nullable<int> value);
    partial void OnArtistIdChanged();
    partial void OnGenreIdChanging(System.Nullable<int> value);
    partial void OnGenreIdChanged();
    partial void OnAlbumNameChanging(string value);
    partial void OnAlbumNameChanged();
    partial void OnYearChanging(System.Nullable<int> value);
    partial void OnYearChanged();
    partial void OnPicturePresentChanging(System.Nullable<bool> value);
    partial void OnPicturePresentChanged();
    #endregion
		
		public Album()
		{
			OnCreated();
		}
		
		[Column(Storage="_AlbumId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int AlbumId
		{
			get
			{
				return this._AlbumId;
			}
			set
			{
				if ((this._AlbumId != value))
				{
					this.OnAlbumIdChanging(value);
					this.SendPropertyChanging();
					this._AlbumId = value;
					this.SendPropertyChanged("AlbumId");
					this.OnAlbumIdChanged();
				}
			}
		}
		
		[Column(Storage="_ArtistId", DbType="Int")]
		public System.Nullable<int> ArtistId
		{
			get
			{
				return this._ArtistId;
			}
			set
			{
				if ((this._ArtistId != value))
				{
					this.OnArtistIdChanging(value);
					this.SendPropertyChanging();
					this._ArtistId = value;
					this.SendPropertyChanged("ArtistId");
					this.OnArtistIdChanged();
				}
			}
		}
		
		[Column(Storage="_GenreId", DbType="Int")]
		public System.Nullable<int> GenreId
		{
			get
			{
				return this._GenreId;
			}
			set
			{
				if ((this._GenreId != value))
				{
					this.OnGenreIdChanging(value);
					this.SendPropertyChanging();
					this._GenreId = value;
					this.SendPropertyChanged("GenreId");
					this.OnGenreIdChanged();
				}
			}
		}
		
		[Column(Storage="_AlbumName", DbType="NVarChar(256)")]
		public string AlbumName
		{
			get
			{
				return this._AlbumName;
			}
			set
			{
				if ((this._AlbumName != value))
				{
					this.OnAlbumNameChanging(value);
					this.SendPropertyChanging();
					this._AlbumName = value;
					this.SendPropertyChanged("AlbumName");
					this.OnAlbumNameChanged();
				}
			}
		}
		
		[Column(Storage="_Year", DbType="Int")]
		public System.Nullable<int> Year
		{
			get
			{
				return this._Year;
			}
			set
			{
				if ((this._Year != value))
				{
					this.OnYearChanging(value);
					this.SendPropertyChanging();
					this._Year = value;
					this.SendPropertyChanged("Year");
					this.OnYearChanged();
				}
			}
		}
		
		[Column(Storage="_PicturePresent", DbType="Bit")]
		public System.Nullable<bool> PicturePresent
		{
			get
			{
				return this._PicturePresent;
			}
			set
			{
				if ((this._PicturePresent != value))
				{
					this.OnPicturePresentChanging(value);
					this.SendPropertyChanging();
					this._PicturePresent = value;
					this.SendPropertyChanged("PicturePresent");
					this.OnPicturePresentChanged();
				}
			}
		}
		
		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
