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

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

        #endregion
    }
    

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

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String ca_code
        {
            get
            {
                return _ca_code;
            }
            set
            {
                if (_ca_code != value)
                {
                    Onca_codeChanging(value);
                    ReportPropertyChanging("ca_code");
                    _ca_code = StructuralObject.SetValidValue(value, false);
                    ReportPropertyChanged("ca_code");
                    Onca_codeChanged();
                }
            }
        }
        private global::System.String _ca_code;
        partial void Onca_codeChanging(global::System.String value);
        partial void Onca_codeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ca_name
        {
            get
            {
                return _ca_name;
            }
            set
            {
                Onca_nameChanging(value);
                ReportPropertyChanging("ca_name");
                _ca_name = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ca_name");
                Onca_nameChanged();
            }
        }
        private global::System.String _ca_name;
        partial void Onca_nameChanging(global::System.String value);
        partial void Onca_nameChanged();

        #endregion
    
    }

    #endregion
    
}
