//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated from a template.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data.Common;
using System.Data.EntityClient;
using System.Data.Metadata.Edm;
using System.Data.Objects.DataClasses;
using System.Data.Objects;
using System.Data;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using WWWings_GO;


namespace WWWings_DZS
{
    public partial class WWWingsModellContainer : ObjectContext
    {
        public const string ConnectionString = "name=WWWingsModellContainer";
        public const string ContainerName = "WWWingsModellContainer";
    
        #region Constructors
    
        public WWWingsModellContainer()
            : base(ConnectionString, ContainerName)
        {
            Initialize();
        }
    
        public WWWingsModellContainer(string connectionString)
            : base(connectionString, ContainerName)
        {
            Initialize();
        }
    
        public WWWingsModellContainer(EntityConnection connection)
            : base(connection, ContainerName)
        {
            Initialize();
        }
    
        private void Initialize()
        {
            // Creating proxies requires the use of the ProxyDataContractResolver and
            // may allow lazy loading which can expand the loaded graph during serialization.
            ContextOptions.ProxyCreationEnabled = false;
            ObjectMaterialized += new ObjectMaterializedEventHandler(HandleObjectMaterialized);
        }
    
        private void HandleObjectMaterialized(object sender, ObjectMaterializedEventArgs e)
        {
            var entity = e.Entity as IObjectWithChangeTracker;
            if (entity != null)
            {
                bool changeTrackingEnabled = entity.ChangeTracker.ChangeTrackingEnabled;
                try
                {
                    entity.MarkAsUnchanged();
                }
                finally
                {
                    entity.ChangeTracker.ChangeTrackingEnabled = changeTrackingEnabled;
                }
                this.StoreReferenceKeyValues(entity);
            }
        }
    
        #endregion
    
        #region ObjectSet Properties
    
        public ObjectSet<Person> PersonSet
        {
            get { return _personSet  ?? (_personSet = CreateObjectSet<Person>("PersonSet")); }
        }
        private ObjectSet<Person> _personSet;
    
        public ObjectSet<Flug> FlugSet
        {
            get { return _flugSet  ?? (_flugSet = CreateObjectSet<Flug>("FlugSet")); }
        }
        private ObjectSet<Flug> _flugSet;

        #endregion
    }
}
