//------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated from a template.
//
//    Manual changes to this file may cause unexpected behavior in your application.
//    Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;

[assembly: EdmSchemaAttribute()]
#region EDM Relationship Metadata

[assembly: EdmRelationshipAttribute("AjaxDestinations.Models", "FK_Bookings_Tours", "Tours", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AjaxDestinations.Models.Tour), "Bookings", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AjaxDestinations.Models.Booking), true)]
[assembly: EdmRelationshipAttribute("AjaxDestinations.Models", "FK_Bookings_Users", "Users", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AjaxDestinations.Models.User), "Bookings", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AjaxDestinations.Models.Booking), true)]
[assembly: EdmRelationshipAttribute("AjaxDestinations.Models", "FK_Subscriptions_MailingLists", "MailingLists", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AjaxDestinations.Models.MailingList), "Subscriptions", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AjaxDestinations.Models.Subscription), true)]
[assembly: EdmRelationshipAttribute("AjaxDestinations.Models", "FK__Tours__Packages", "Packages", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AjaxDestinations.Models.Package), "Tours", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AjaxDestinations.Models.Tour), true)]
[assembly: EdmRelationshipAttribute("AjaxDestinations.Models", "FK_Subscriptions_Users", "Users", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AjaxDestinations.Models.User), "Subscriptions", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AjaxDestinations.Models.Subscription), true)]

#endregion

namespace AjaxDestinations.Models
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class gcutourswmEntities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new gcutourswmEntities object using the connection string found in the 'gcutourswmEntities' section of the application configuration file.
        /// </summary>
        public gcutourswmEntities() : base("name=gcutourswmEntities", "gcutourswmEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new gcutourswmEntities object.
        /// </summary>
        public gcutourswmEntities(string connectionString) : base(connectionString, "gcutourswmEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new gcutourswmEntities object.
        /// </summary>
        public gcutourswmEntities(EntityConnection connection) : base(connection, "gcutourswmEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Booking> Bookings
        {
            get
            {
                if ((_Bookings == null))
                {
                    _Bookings = base.CreateObjectSet<Booking>("Bookings");
                }
                return _Bookings;
            }
        }
        private ObjectSet<Booking> _Bookings;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MailingList> MailingLists
        {
            get
            {
                if ((_MailingLists == null))
                {
                    _MailingLists = base.CreateObjectSet<MailingList>("MailingLists");
                }
                return _MailingLists;
            }
        }
        private ObjectSet<MailingList> _MailingLists;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Package> Packages
        {
            get
            {
                if ((_Packages == null))
                {
                    _Packages = base.CreateObjectSet<Package>("Packages");
                }
                return _Packages;
            }
        }
        private ObjectSet<Package> _Packages;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Subscription> Subscriptions
        {
            get
            {
                if ((_Subscriptions == null))
                {
                    _Subscriptions = base.CreateObjectSet<Subscription>("Subscriptions");
                }
                return _Subscriptions;
            }
        }
        private ObjectSet<Subscription> _Subscriptions;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Tour> Tours
        {
            get
            {
                if ((_Tours == null))
                {
                    _Tours = base.CreateObjectSet<Tour>("Tours");
                }
                return _Tours;
            }
        }
        private ObjectSet<Tour> _Tours;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<User> Users
        {
            get
            {
                if ((_Users == null))
                {
                    _Users = base.CreateObjectSet<User>("Users");
                }
                return _Users;
            }
        }
        private ObjectSet<User> _Users;

        #endregion
        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Bookings EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToBookings(Booking booking)
        {
            base.AddObject("Bookings", booking);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MailingLists EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMailingLists(MailingList mailingList)
        {
            base.AddObject("MailingLists", mailingList);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Packages EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToPackages(Package package)
        {
            base.AddObject("Packages", package);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Subscriptions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSubscriptions(Subscription subscription)
        {
            base.AddObject("Subscriptions", subscription);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Tours EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToTours(Tour tour)
        {
            base.AddObject("Tours", tour);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Users EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToUsers(User user)
        {
            base.AddObject("Users", user);
        }

        #endregion
    }
    

    #endregion
    
    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AjaxDestinations.Models", Name="Booking")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Booking : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Booking object.
        /// </summary>
        /// <param name="bookingID">Initial value of the bookingID property.</param>
        public static Booking CreateBooking(global::System.Int32 bookingID)
        {
            Booking booking = new Booking();
            booking.bookingID = bookingID;
            return booking;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 bookingID
        {
            get
            {
                return _bookingID;
            }
            set
            {
                if (_bookingID != value)
                {
                    OnbookingIDChanging(value);
                    ReportPropertyChanging("bookingID");
                    _bookingID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("bookingID");
                    OnbookingIDChanged();
                }
            }
        }
        private global::System.Int32 _bookingID;
        partial void OnbookingIDChanging(global::System.Int32 value);
        partial void OnbookingIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> tourID
        {
            get
            {
                return _tourID;
            }
            set
            {
                OntourIDChanging(value);
                ReportPropertyChanging("tourID");
                _tourID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("tourID");
                OntourIDChanged();
            }
        }
        private Nullable<global::System.Int32> _tourID;
        partial void OntourIDChanging(Nullable<global::System.Int32> value);
        partial void OntourIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String username
        {
            get
            {
                return _username;
            }
            set
            {
                OnusernameChanging(value);
                ReportPropertyChanging("username");
                _username = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("username");
                OnusernameChanged();
            }
        }
        private global::System.String _username;
        partial void OnusernameChanging(global::System.String value);
        partial void OnusernameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> adults
        {
            get
            {
                return _adults;
            }
            set
            {
                OnadultsChanging(value);
                ReportPropertyChanging("adults");
                _adults = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("adults");
                OnadultsChanged();
            }
        }
        private Nullable<global::System.Int32> _adults;
        partial void OnadultsChanging(Nullable<global::System.Int32> value);
        partial void OnadultsChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> children
        {
            get
            {
                return _children;
            }
            set
            {
                OnchildrenChanging(value);
                ReportPropertyChanging("children");
                _children = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("children");
                OnchildrenChanged();
            }
        }
        private Nullable<global::System.Int32> _children;
        partial void OnchildrenChanging(Nullable<global::System.Int32> value);
        partial void OnchildrenChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String status
        {
            get
            {
                return _status;
            }
            set
            {
                OnstatusChanging(value);
                ReportPropertyChanging("status");
                _status = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("status");
                OnstatusChanged();
            }
        }
        private global::System.String _status;
        partial void OnstatusChanging(global::System.String value);
        partial void OnstatusChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK_Bookings_Tours", "Tours")]
        public Tour Tour
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tour>("AjaxDestinations.Models.FK_Bookings_Tours", "Tours").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tour>("AjaxDestinations.Models.FK_Bookings_Tours", "Tours").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Tour> TourReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tour>("AjaxDestinations.Models.FK_Bookings_Tours", "Tours");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Tour>("AjaxDestinations.Models.FK_Bookings_Tours", "Tours", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK_Bookings_Users", "Users")]
        public User User
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("AjaxDestinations.Models.FK_Bookings_Users", "Users").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("AjaxDestinations.Models.FK_Bookings_Users", "Users").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<User> UserReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("AjaxDestinations.Models.FK_Bookings_Users", "Users");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<User>("AjaxDestinations.Models.FK_Bookings_Users", "Users", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AjaxDestinations.Models", Name="MailingList")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MailingList : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MailingList object.
        /// </summary>
        /// <param name="mailinglistID">Initial value of the mailinglistID property.</param>
        public static MailingList CreateMailingList(global::System.Int32 mailinglistID)
        {
            MailingList mailingList = new MailingList();
            mailingList.mailinglistID = mailinglistID;
            return mailingList;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 mailinglistID
        {
            get
            {
                return _mailinglistID;
            }
            set
            {
                if (_mailinglistID != value)
                {
                    OnmailinglistIDChanging(value);
                    ReportPropertyChanging("mailinglistID");
                    _mailinglistID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("mailinglistID");
                    OnmailinglistIDChanged();
                }
            }
        }
        private global::System.Int32 _mailinglistID;
        partial void OnmailinglistIDChanging(global::System.Int32 value);
        partial void OnmailinglistIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String title
        {
            get
            {
                return _title;
            }
            set
            {
                OntitleChanging(value);
                ReportPropertyChanging("title");
                _title = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("title");
                OntitleChanged();
            }
        }
        private global::System.String _title;
        partial void OntitleChanging(global::System.String value);
        partial void OntitleChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String description
        {
            get
            {
                return _description;
            }
            set
            {
                OndescriptionChanging(value);
                ReportPropertyChanging("description");
                _description = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("description");
                OndescriptionChanged();
            }
        }
        private global::System.String _description;
        partial void OndescriptionChanging(global::System.String value);
        partial void OndescriptionChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK_Subscriptions_MailingLists", "Subscriptions")]
        public EntityCollection<Subscription> Subscriptions
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Subscription>("AjaxDestinations.Models.FK_Subscriptions_MailingLists", "Subscriptions");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Subscription>("AjaxDestinations.Models.FK_Subscriptions_MailingLists", "Subscriptions", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AjaxDestinations.Models", Name="Package")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Package : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Package object.
        /// </summary>
        /// <param name="packageID">Initial value of the packageID property.</param>
        public static Package CreatePackage(global::System.Int32 packageID)
        {
            Package package = new Package();
            package.packageID = packageID;
            return package;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 packageID
        {
            get
            {
                return _packageID;
            }
            set
            {
                if (_packageID != value)
                {
                    OnpackageIDChanging(value);
                    ReportPropertyChanging("packageID");
                    _packageID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("packageID");
                    OnpackageIDChanged();
                }
            }
        }
        private global::System.Int32 _packageID;
        partial void OnpackageIDChanging(global::System.Int32 value);
        partial void OnpackageIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String location
        {
            get
            {
                return _location;
            }
            set
            {
                OnlocationChanging(value);
                ReportPropertyChanging("location");
                _location = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("location");
                OnlocationChanged();
            }
        }
        private global::System.String _location;
        partial void OnlocationChanging(global::System.String value);
        partial void OnlocationChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String packagename
        {
            get
            {
                return _packagename;
            }
            set
            {
                OnpackagenameChanging(value);
                ReportPropertyChanging("packagename");
                _packagename = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("packagename");
                OnpackagenameChanged();
            }
        }
        private global::System.String _packagename;
        partial void OnpackagenameChanging(global::System.String value);
        partial void OnpackagenameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String description
        {
            get
            {
                return _description;
            }
            set
            {
                OndescriptionChanging(value);
                ReportPropertyChanging("description");
                _description = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("description");
                OndescriptionChanged();
            }
        }
        private global::System.String _description;
        partial void OndescriptionChanging(global::System.String value);
        partial void OndescriptionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> adultprice
        {
            get
            {
                return _adultprice;
            }
            set
            {
                OnadultpriceChanging(value);
                ReportPropertyChanging("adultprice");
                _adultprice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("adultprice");
                OnadultpriceChanged();
            }
        }
        private Nullable<global::System.Decimal> _adultprice;
        partial void OnadultpriceChanging(Nullable<global::System.Decimal> value);
        partial void OnadultpriceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> childprice
        {
            get
            {
                return _childprice;
            }
            set
            {
                OnchildpriceChanging(value);
                ReportPropertyChanging("childprice");
                _childprice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("childprice");
                OnchildpriceChanged();
            }
        }
        private Nullable<global::System.Decimal> _childprice;
        partial void OnchildpriceChanging(Nullable<global::System.Decimal> value);
        partial void OnchildpriceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String departure
        {
            get
            {
                return _departure;
            }
            set
            {
                OndepartureChanging(value);
                ReportPropertyChanging("departure");
                _departure = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("departure");
                OndepartureChanged();
            }
        }
        private global::System.String _departure;
        partial void OndepartureChanging(global::System.String value);
        partial void OndepartureChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> sales
        {
            get
            {
                return _sales;
            }
            set
            {
                OnsalesChanging(value);
                ReportPropertyChanging("sales");
                _sales = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("sales");
                OnsalesChanged();
            }
        }
        private Nullable<global::System.Int32> _sales;
        partial void OnsalesChanging(Nullable<global::System.Int32> value);
        partial void OnsalesChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String tourpicurl
        {
            get
            {
                return _tourpicurl;
            }
            set
            {
                OntourpicurlChanging(value);
                ReportPropertyChanging("tourpicurl");
                _tourpicurl = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("tourpicurl");
                OntourpicurlChanged();
            }
        }
        private global::System.String _tourpicurl;
        partial void OntourpicurlChanging(global::System.String value);
        partial void OntourpicurlChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String tourvidurl
        {
            get
            {
                return _tourvidurl;
            }
            set
            {
                OntourvidurlChanging(value);
                ReportPropertyChanging("tourvidurl");
                _tourvidurl = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("tourvidurl");
                OntourvidurlChanged();
            }
        }
        private global::System.String _tourvidurl;
        partial void OntourvidurlChanging(global::System.String value);
        partial void OntourvidurlChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK__Tours__Packages", "Tours")]
        public EntityCollection<Tour> Tours
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Tour>("AjaxDestinations.Models.FK__Tours__Packages", "Tours");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Tour>("AjaxDestinations.Models.FK__Tours__Packages", "Tours", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AjaxDestinations.Models", Name="Subscription")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Subscription : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Subscription object.
        /// </summary>
        /// <param name="username">Initial value of the username property.</param>
        /// <param name="mailinglistID">Initial value of the mailinglistID property.</param>
        public static Subscription CreateSubscription(global::System.String username, global::System.Int32 mailinglistID)
        {
            Subscription subscription = new Subscription();
            subscription.username = username;
            subscription.mailinglistID = mailinglistID;
            return subscription;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String username
        {
            get
            {
                return _username;
            }
            set
            {
                if (_username != value)
                {
                    OnusernameChanging(value);
                    ReportPropertyChanging("username");
                    _username = StructuralObject.SetValidValue(value, false);
                    ReportPropertyChanged("username");
                    OnusernameChanged();
                }
            }
        }
        private global::System.String _username;
        partial void OnusernameChanging(global::System.String value);
        partial void OnusernameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 mailinglistID
        {
            get
            {
                return _mailinglistID;
            }
            set
            {
                if (_mailinglistID != value)
                {
                    OnmailinglistIDChanging(value);
                    ReportPropertyChanging("mailinglistID");
                    _mailinglistID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("mailinglistID");
                    OnmailinglistIDChanged();
                }
            }
        }
        private global::System.Int32 _mailinglistID;
        partial void OnmailinglistIDChanging(global::System.Int32 value);
        partial void OnmailinglistIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> subscriptiondate
        {
            get
            {
                return _subscriptiondate;
            }
            set
            {
                OnsubscriptiondateChanging(value);
                ReportPropertyChanging("subscriptiondate");
                _subscriptiondate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("subscriptiondate");
                OnsubscriptiondateChanged();
            }
        }
        private Nullable<global::System.DateTime> _subscriptiondate;
        partial void OnsubscriptiondateChanging(Nullable<global::System.DateTime> value);
        partial void OnsubscriptiondateChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK_Subscriptions_MailingLists", "MailingLists")]
        public MailingList MailingList
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<MailingList>("AjaxDestinations.Models.FK_Subscriptions_MailingLists", "MailingLists").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<MailingList>("AjaxDestinations.Models.FK_Subscriptions_MailingLists", "MailingLists").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<MailingList> MailingListReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<MailingList>("AjaxDestinations.Models.FK_Subscriptions_MailingLists", "MailingLists");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<MailingList>("AjaxDestinations.Models.FK_Subscriptions_MailingLists", "MailingLists", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK_Subscriptions_Users", "Users")]
        public User User
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("AjaxDestinations.Models.FK_Subscriptions_Users", "Users").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("AjaxDestinations.Models.FK_Subscriptions_Users", "Users").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<User> UserReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("AjaxDestinations.Models.FK_Subscriptions_Users", "Users");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<User>("AjaxDestinations.Models.FK_Subscriptions_Users", "Users", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AjaxDestinations.Models", Name="Tour")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Tour : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Tour object.
        /// </summary>
        /// <param name="tourID">Initial value of the tourID property.</param>
        public static Tour CreateTour(global::System.Int32 tourID)
        {
            Tour tour = new Tour();
            tour.tourID = tourID;
            return tour;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 tourID
        {
            get
            {
                return _tourID;
            }
            set
            {
                if (_tourID != value)
                {
                    OntourIDChanging(value);
                    ReportPropertyChanging("tourID");
                    _tourID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("tourID");
                    OntourIDChanged();
                }
            }
        }
        private global::System.Int32 _tourID;
        partial void OntourIDChanging(global::System.Int32 value);
        partial void OntourIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> departuredate
        {
            get
            {
                return _departuredate;
            }
            set
            {
                OndeparturedateChanging(value);
                ReportPropertyChanging("departuredate");
                _departuredate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("departuredate");
                OndeparturedateChanged();
            }
        }
        private Nullable<global::System.DateTime> _departuredate;
        partial void OndeparturedateChanging(Nullable<global::System.DateTime> value);
        partial void OndeparturedateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> offer
        {
            get
            {
                return _offer;
            }
            set
            {
                OnofferChanging(value);
                ReportPropertyChanging("offer");
                _offer = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("offer");
                OnofferChanged();
            }
        }
        private Nullable<global::System.Decimal> _offer;
        partial void OnofferChanging(Nullable<global::System.Decimal> value);
        partial void OnofferChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> packageID
        {
            get
            {
                return _packageID;
            }
            set
            {
                OnpackageIDChanging(value);
                ReportPropertyChanging("packageID");
                _packageID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("packageID");
                OnpackageIDChanged();
            }
        }
        private Nullable<global::System.Int32> _packageID;
        partial void OnpackageIDChanging(Nullable<global::System.Int32> value);
        partial void OnpackageIDChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK_Bookings_Tours", "Bookings")]
        public EntityCollection<Booking> Bookings
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Booking>("AjaxDestinations.Models.FK_Bookings_Tours", "Bookings");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Booking>("AjaxDestinations.Models.FK_Bookings_Tours", "Bookings", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK__Tours__Packages", "Packages")]
        public Package Package
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Package>("AjaxDestinations.Models.FK__Tours__Packages", "Packages").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Package>("AjaxDestinations.Models.FK__Tours__Packages", "Packages").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Package> PackageReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Package>("AjaxDestinations.Models.FK__Tours__Packages", "Packages");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Package>("AjaxDestinations.Models.FK__Tours__Packages", "Packages", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AjaxDestinations.Models", Name="User")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class User : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new User object.
        /// </summary>
        /// <param name="username">Initial value of the username property.</param>
        public static User CreateUser(global::System.String username)
        {
            User user = new User();
            user.username = username;
            return user;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String firstname
        {
            get
            {
                return _firstname;
            }
            set
            {
                OnfirstnameChanging(value);
                ReportPropertyChanging("firstname");
                _firstname = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("firstname");
                OnfirstnameChanged();
            }
        }
        private global::System.String _firstname;
        partial void OnfirstnameChanging(global::System.String value);
        partial void OnfirstnameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String lastname
        {
            get
            {
                return _lastname;
            }
            set
            {
                OnlastnameChanging(value);
                ReportPropertyChanging("lastname");
                _lastname = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("lastname");
                OnlastnameChanged();
            }
        }
        private global::System.String _lastname;
        partial void OnlastnameChanging(global::System.String value);
        partial void OnlastnameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String address
        {
            get
            {
                return _address;
            }
            set
            {
                OnaddressChanging(value);
                ReportPropertyChanging("address");
                _address = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("address");
                OnaddressChanged();
            }
        }
        private global::System.String _address;
        partial void OnaddressChanging(global::System.String value);
        partial void OnaddressChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String username
        {
            get
            {
                return _username;
            }
            set
            {
                if (_username != value)
                {
                    OnusernameChanging(value);
                    ReportPropertyChanging("username");
                    _username = StructuralObject.SetValidValue(value, false);
                    ReportPropertyChanged("username");
                    OnusernameChanged();
                }
            }
        }
        private global::System.String _username;
        partial void OnusernameChanging(global::System.String value);
        partial void OnusernameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String password
        {
            get
            {
                return _password;
            }
            set
            {
                OnpasswordChanging(value);
                ReportPropertyChanging("password");
                _password = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("password");
                OnpasswordChanged();
            }
        }
        private global::System.String _password;
        partial void OnpasswordChanging(global::System.String value);
        partial void OnpasswordChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> datejoined
        {
            get
            {
                return _datejoined;
            }
            set
            {
                OndatejoinedChanging(value);
                ReportPropertyChanging("datejoined");
                _datejoined = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("datejoined");
                OndatejoinedChanged();
            }
        }
        private Nullable<global::System.DateTime> _datejoined;
        partial void OndatejoinedChanging(Nullable<global::System.DateTime> value);
        partial void OndatejoinedChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK_Bookings_Users", "Bookings")]
        public EntityCollection<Booking> Bookings
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Booking>("AjaxDestinations.Models.FK_Bookings_Users", "Bookings");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Booking>("AjaxDestinations.Models.FK_Bookings_Users", "Bookings", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AjaxDestinations.Models", "FK_Subscriptions_Users", "Subscriptions")]
        public EntityCollection<Subscription> Subscriptions
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Subscription>("AjaxDestinations.Models.FK_Subscriptions_Users", "Subscriptions");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Subscription>("AjaxDestinations.Models.FK_Subscriptions_Users", "Subscriptions", value);
                }
            }
        }

        #endregion
    }

    #endregion
    
}
