//------------------------------------------------------------------------------
// <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()]

namespace TimeBarFirstLook_WCF_RIA.Web
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class DatabaseEntities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new DatabaseEntities object using the connection string found in the 'DatabaseEntities' section of the application configuration file.
        /// </summary>
        public DatabaseEntities() : base("name=DatabaseEntities", "DatabaseEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new DatabaseEntities object.
        /// </summary>
        public DatabaseEntities(string connectionString) : base(connectionString, "DatabaseEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new DatabaseEntities object.
        /// </summary>
        public DatabaseEntities(EntityConnection connection) : base(connection, "DatabaseEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<FlightStatisticsView> FlightStatisticsViews
        {
            get
            {
                if ((_FlightStatisticsViews == null))
                {
                    _FlightStatisticsViews = base.CreateObjectSet<FlightStatisticsView>("FlightStatisticsViews");
                }
                return _FlightStatisticsViews;
            }
        }
        private ObjectSet<FlightStatisticsView> _FlightStatisticsViews;

        #endregion
        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the FlightStatisticsViews EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToFlightStatisticsViews(FlightStatisticsView flightStatisticsView)
        {
            base.AddObject("FlightStatisticsViews", flightStatisticsView);
        }

        #endregion
    }
    

    #endregion
    
    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DatabaseModel", Name="FlightStatisticsView")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class FlightStatisticsView : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new FlightStatisticsView object.
        /// </summary>
        /// <param name="timeStamp">Initial value of the TimeStamp property.</param>
        /// <param name="arrivals">Initial value of the Arrivals property.</param>
        /// <param name="departures">Initial value of the Departures property.</param>
        public static FlightStatisticsView CreateFlightStatisticsView(global::System.DateTime timeStamp, global::System.Int32 arrivals, global::System.Int32 departures)
        {
            FlightStatisticsView flightStatisticsView = new FlightStatisticsView();
            flightStatisticsView.TimeStamp = timeStamp;
            flightStatisticsView.Arrivals = arrivals;
            flightStatisticsView.Departures = departures;
            return flightStatisticsView;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime TimeStamp
        {
            get
            {
                return _TimeStamp;
            }
            set
            {
                if (_TimeStamp != value)
                {
                    OnTimeStampChanging(value);
                    ReportPropertyChanging("TimeStamp");
                    _TimeStamp = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("TimeStamp");
                    OnTimeStampChanged();
                }
            }
        }
        private global::System.DateTime _TimeStamp;
        partial void OnTimeStampChanging(global::System.DateTime value);
        partial void OnTimeStampChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Arrivals
        {
            get
            {
                return _Arrivals;
            }
            set
            {
                if (_Arrivals != value)
                {
                    OnArrivalsChanging(value);
                    ReportPropertyChanging("Arrivals");
                    _Arrivals = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Arrivals");
                    OnArrivalsChanged();
                }
            }
        }
        private global::System.Int32 _Arrivals;
        partial void OnArrivalsChanging(global::System.Int32 value);
        partial void OnArrivalsChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Departures
        {
            get
            {
                return _Departures;
            }
            set
            {
                if (_Departures != value)
                {
                    OnDeparturesChanging(value);
                    ReportPropertyChanging("Departures");
                    _Departures = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Departures");
                    OnDeparturesChanged();
                }
            }
        }
        private global::System.Int32 _Departures;
        partial void OnDeparturesChanging(global::System.Int32 value);
        partial void OnDeparturesChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> Total
        {
            get
            {
                return _Total;
            }
            set
            {
                OnTotalChanging(value);
                ReportPropertyChanging("Total");
                _Total = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Total");
                OnTotalChanged();
            }
        }
        private Nullable<global::System.Int32> _Total;
        partial void OnTotalChanging(Nullable<global::System.Int32> value);
        partial void OnTotalChanged();

        #endregion
    
    }

    #endregion
    
}
