//------------------------------------------------------------------------------
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using NHibernate template.
// Code is generated on: 18.06.2012 13:09:16
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------

using System;
using System.Collections;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Collections.Generic;

namespace CollectionsOfComponents
{

    /// <summary>
    /// There are no comments for CollectionsOfComponents.Department, CollectionsOfComponents in the schema.
    /// </summary>
    public partial class Department {

        private int _DepartmentId;

        private string _Name;

        private Iesi.Collections.Generic.ISet<EmployeeType> _Employees;
    
        #region Extensibility Method Definitions
        
        partial void OnCreated();

        public override bool Equals(object obj)
        {
          Department toCompare = obj as Department;
          if (toCompare == null)
          {
            return false;
          }

          if (!Object.Equals(this.DepartmentId, toCompare.DepartmentId))
            return false;
          
          return true;
        }

        public override int GetHashCode()
        {
          int hashCode = 13;
          hashCode = (hashCode * 7) + DepartmentId.GetHashCode();
          return hashCode;
        }
        
        #endregion

        public Department()
        {
            this._Employees = new Iesi.Collections.Generic.HashedSet<EmployeeType>();
            OnCreated();
        }

    
        /// <summary>
        /// There are no comments for DepartmentId in the schema.
        /// </summary>
        public virtual int DepartmentId
        {
            get
            {
                return this._DepartmentId;
            }
            set
            {
                this._DepartmentId = value;
            }
        }

    
        /// <summary>
        /// There are no comments for Name in the schema.
        /// </summary>
        public virtual string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this._Name = value;
            }
        }

    
        /// <summary>
        /// There are no comments for Employees in the schema.
        /// </summary>
        public virtual Iesi.Collections.Generic.ISet<EmployeeType> Employees
        {
            get
            {
                return this._Employees;
            }
            set
            {
                this._Employees = value;
            }
        }
    }

}

namespace CollectionsOfComponents
{

    /// <summary>
    /// There are no comments for CollectionsOfComponents.EmployeeType, CollectionsOfComponents in the schema.
    /// </summary>
    public partial class EmployeeType {

        private string _Name;

        private string _Job;
    
        #region Extensibility Method Definitions
        
        partial void OnCreated();

        public override bool Equals(object obj)
        {
          EmployeeType toCompare = obj as EmployeeType;
          if (toCompare == null)
          {
            return false;
          }

          if (!Object.Equals(this.Name, toCompare.Name))
            return false;
          if (!Object.Equals(this.Job, toCompare.Job))
            return false;
          
          return true;
        }

        public override int GetHashCode()
        {
          int hashCode = 13;
          hashCode = (hashCode * 7) + Name.GetHashCode();
          hashCode = (hashCode * 7) + Job.GetHashCode();
          return hashCode;
        }
        
        #endregion

        public EmployeeType()
        {
            OnCreated();
        }

    
        /// <summary>
        /// There are no comments for Name in the schema.
        /// </summary>
        public virtual string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this._Name = value;
            }
        }

    
        /// <summary>
        /// There are no comments for Job in the schema.
        /// </summary>
        public virtual string Job
        {
            get
            {
                return this._Job;
            }
            set
            {
                this._Job = value;
            }
        }
    }

}
