//------------------------------------------------------------------------------
// <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 Nawigacja.Models
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class NawigacjaDatabaseEntities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new NawigacjaDatabaseEntities object using the connection string found in the 'NawigacjaDatabaseEntities' section of the application configuration file.
        /// </summary>
        public NawigacjaDatabaseEntities() : base("name=NawigacjaDatabaseEntities", "NawigacjaDatabaseEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new NawigacjaDatabaseEntities object.
        /// </summary>
        public NawigacjaDatabaseEntities(string connectionString) : base(connectionString, "NawigacjaDatabaseEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new NawigacjaDatabaseEntities object.
        /// </summary>
        public NawigacjaDatabaseEntities(EntityConnection connection) : base(connection, "NawigacjaDatabaseEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Adresy> Adresy
        {
            get
            {
                if ((_Adresy == null))
                {
                    _Adresy = base.CreateObjectSet<Adresy>("Adresy");
                }
                return _Adresy;
            }
        }
        private ObjectSet<Adresy> _Adresy;

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

        #endregion
    }
    

    #endregion
    
    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="NawigacjaDatabaseModel", Name="Adresy")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Adresy : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Adresy object.
        /// </summary>
        /// <param name="idTrasy">Initial value of the IdTrasy property.</param>
        /// <param name="start">Initial value of the Start property.</param>
        /// <param name="meta">Initial value of the Meta property.</param>
        /// <param name="dataDodania">Initial value of the dataDodania property.</param>
        public static Adresy CreateAdresy(global::System.Int32 idTrasy, global::System.String start, global::System.String meta, global::System.DateTime dataDodania)
        {
            Adresy adresy = new Adresy();
            adresy.IdTrasy = idTrasy;
            adresy.Start = start;
            adresy.Meta = meta;
            adresy.dataDodania = dataDodania;
            return adresy;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 IdTrasy
        {
            get
            {
                return _IdTrasy;
            }
            set
            {
                if (_IdTrasy != value)
                {
                    OnIdTrasyChanging(value);
                    ReportPropertyChanging("IdTrasy");
                    _IdTrasy = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("IdTrasy");
                    OnIdTrasyChanged();
                }
            }
        }
        private global::System.Int32 _IdTrasy;
        partial void OnIdTrasyChanging(global::System.Int32 value);
        partial void OnIdTrasyChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Start
        {
            get
            {
                return _Start;
            }
            set
            {
                OnStartChanging(value);
                ReportPropertyChanging("Start");
                _Start = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Start");
                OnStartChanged();
            }
        }
        private global::System.String _Start;
        partial void OnStartChanging(global::System.String value);
        partial void OnStartChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Meta
        {
            get
            {
                return _Meta;
            }
            set
            {
                OnMetaChanging(value);
                ReportPropertyChanging("Meta");
                _Meta = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Meta");
                OnMetaChanged();
            }
        }
        private global::System.String _Meta;
        partial void OnMetaChanging(global::System.String value);
        partial void OnMetaChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime dataDodania
        {
            get
            {
                return _dataDodania;
            }
            set
            {
                OndataDodaniaChanging(value);
                ReportPropertyChanging("dataDodania");
                _dataDodania = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("dataDodania");
                OndataDodaniaChanged();
            }
        }
        private global::System.DateTime _dataDodania;
        partial void OndataDodaniaChanging(global::System.DateTime value);
        partial void OndataDodaniaChanged();

        #endregion
    
    }

    #endregion
    
}
